Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading vls from 0.5 to 0.6 breaks atom-ide-vue #2561

Closed
2 of 4 tasks
aminya opened this issue Dec 12, 2020 · 5 comments
Closed
2 of 4 tasks

upgrading vls from 0.5 to 0.6 breaks atom-ide-vue #2561

aminya opened this issue Dec 12, 2020 · 5 comments
Labels
bug lsp:general LSP integration for use in LSP clients

Comments

@aminya
Copy link

aminya commented Dec 12, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ -> This link does not exist.
  • I have tried restarting VS Code or running Vetur: Restart VLS -> N/A

Info

  • Platform: Win 10
  • Vetur version: -> Vls 0.6
  • VS Code version: N/A

atom-langaugeclient has these dependencies:
"vscode-jsonrpc": "5.0.1",
"vscode-languageserver-protocol": "3.15.3",
"vscode-languageserver-types": "3.15.1"

Problem

Hi. The atom-ide-vue maintainer here. I recently updated vls from 0.5 to 0.6, but that broke the server and the plugin (datatips, autocomplete, etc). So I had to downgrade to 0.5.

Here is the code for atom-ide-vue. As you see, it is minimal because most of the work is handled by atom-languageclient which uses vscode-languageserver underneath.
https://github.com/atom-ide-community/atom-ide-vue/blob/master/lib/main.js

I could not find a changelog for vls to see the changes.

These are the kind of errors that we get:
image

We have an issue for it: atom-community/atom-ide-vue#35 (comment)

Reproducible Case

  • Install Atom.
  • apm install language-vue atom-ide-base atom-ide-javascript
  • git clone https://github.com/atom-ide-community/atom-ide-vue
  • cd atom-ide-vue
  • npm install
  • npm install vls@0.6
  • apm link .
  • cd spec/project/hello-world
  • atom .
  • CTRL+SHIFT+F5 to open dev tools
  • open App.vue
@yoyo930021 yoyo930021 added bug lsp:general LSP integration for use in LSP clients labels Dec 12, 2020
@yoyo930021
Copy link
Member

I will take a look.

@yoyo930021
Copy link
Member

yoyo930021 commented Dec 12, 2020

Fixed in e9dc769.

I expect workspaceFolders: null in InitializeParams when client no support workspace.
but atom-languageclient send workspaceFolders: [].
https://github.com/atom-ide-community/atom-languageclient/blob/bf599f88726bb68f58932f18d03ba6faffa23d4e/lib/auto-languageclient.ts#L126

And when it's normal, it should send workspaceFolders: [{ name: '', uri: 'xxx/xxx' }].
I also found that it starts multiple clients when atom workspaces.
This does not seem to match the LSP spec.

Vetur will check InitializeParams.capabilities.workspace.workspaceFolder in vls v0.6.3 for fix it.

@aminya
Copy link
Author

aminya commented Dec 12, 2020

Thank you so much! @yoyo930021 I tested it, and now it works as expected!

I expect workspaceFolders: null in InitializeParams when client no support workspace.
but atom-languageclient send workspaceFolders: [].

Is this nullness part of the spec? or it should be []? or it is not specified?

I can send a PR to atom-languageclient to fix these.

CC: @UziTech

@yoyo930021
Copy link
Member

Thank you so much! @yoyo930021 I tested it, and now it works as expected!

I expect workspaceFolders: null in InitializeParams when client no support workspace.
but atom-languageclient send workspaceFolders: [].

Is this nullness part of the spec? or it should be []? or it is not specified?

I can send a PR to atom-languageclient to fix these.

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#initialize

截圖 2020-12-12 下午4 00 19

@aminya
Copy link
Author

aminya commented Dec 12, 2020

Thanks! I will fix it in a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lsp:general LSP integration for use in LSP clients
Projects
None yet
Development

No branches or pull requests

2 participants