Vetur: upgrading vls from 0.5 to 0.6 breaks atom-ide-vue

Created on 12 Dec 2020  路  5Comments  路  Source: vuejs/vetur

  • [x] I have searched through existing issues
  • [x] 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: https://github.com/atom-ide-community/atom-ide-vue/issues/35#issuecomment-743697912

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 [email protected]
  • apm link .
  • cd spec/project/hello-world
  • atom .
  • CTRL+SHIFT+F5 to open dev tools
  • open App.vue
bug general

Most helpful comment

Thanks! I will fix it in a PR.

All 5 comments

I will take a look.

Fixed in e9dc7697.

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.

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

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

Thanks! I will fix it in a PR.

Was this page helpful?
0 / 5 - 0 ratings