question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[LS] Code actions don't return version with textDocument

See original GitHub issue

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 and tsserver regarding sending version number.

Edit: For now these don’t work:

Code Actions:                                                                     
1. (svelte) Disable missing-declaration for this line
2. Import 'teenStyle' from module "./helpers"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dummdidummcommented, Mar 3, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nvim lsp: configure language servers, shortcuts, highlights
In this article, I will explain what is LSP, what are language servers, how to configure them in nvim, highlight symbols under the...
Read more >
Searching - Notepad++ User Manual
Find in Files tab: Allows you to search and replace in multiple files with one action. The files used for the operation are...
Read more >
Integrated Terminal in Visual Studio Code
Visual Studio Code has an integrated terminal to enable working in your shell of choice without leaving the editor.
Read more >
Tutorial — pygls documentation - Read the Docs
You do not need this extension when using pygls with other text editors. ... Code supports Language Server Protocol, which means, that every...
Read more >
Lsp - Neovim docs
The language server uses semantic analysis to understand code at a project level. ... local on_references = vim.lsp.handlers["textDocument/references"] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found