-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
[LS] Code actions don't return version with textDocument #851
Comments
Probably this line needs to get the correct version language-tools/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts Line 146 in eac5c74
|
For Svelte files this should be doable, for TS / JS files however we should leave it as currently because we simply do not know what to set it to since we don't get the current document versions of those. |
Do you mean the situation when we need to apply changes to external js/ts files due to code-action in svelte component? Can't think of an example right now. 🤔 It is interesting, I haven't tested what would happen if I use rename in Wow... it won't. So it looks like svelte language server should be configured for |
It does not and making this possible is tracked in #580 Renames in Svelte files that affects JS files are an example of where the language server returns edits for JS/TS files. |
In the spec the |
Setting it to 0 is against the spec since clients may reject the edits then. Set it to null instead. sveltejs#851
Setting it to 0 is against the spec since clients may reject the edits then. Set it to null instead. #851
This prevents code-actions from working on editors which expect returned version number to be >= of what was sent to the LS.
tsserver
sends same version back and code-actions work just fine.https://github.com/neovim/neovim/blob/c1fbc2ddf15b2f44b615f90b2511349ab974cb83/runtime/lua/vim/lsp/util.lua#L265-L272
Here's code from
neovim-lsp
that checks version number.Will edit more information when I find the differences between
svelteserver
andtsserver
regarding sending version number.Edit: For now these don't work:
The text was updated successfully, but these errors were encountered: