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
Text document version is implemented incorrectly #1490
Comments
Related logs and neovim config: https://gist.github.com/Holi0317/4463e117942cbc2c9533ceae2b9c937c System information
Step to reproduce
DiagnosticThe log attached in the gist only contains a section of the whole lsp log. However it is clear that neovim did indicate |
Hi, @Holi0317 Thanks for the steps to reproduce this in Neovim. This problem is probably a known defect. However, I cannot reproduce it in VSCode on my environment. Can you reproduce this issue in VSCode? If VSCode can reproduce the problem, it may be possible to correct it. |
Hey @yaegassy, I've tried to do the code action thing on vscode. Here is the related logs: https://gist.github.com/Holi0317/7498749499be45f77d9410e167bca677 Seems that the behavior of volar are the same in vscode and neovim. But vscode ignores the incorrect The lsp spec says the version should always be increasing: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#optionalVersionedTextDocumentIdentifier Have tried similar action on tsserver (ask the server apply missing import for me) and tsserver respond with correct (increasing) |
@Holi0317 Thanks for checking the behavior in VSCode. I think we have made a step forward in solving this problem. BTW, I am the maintainer of |
A workaround? Please. |
I am using neovim as the client. Whenever I apply a code action, neovim shows a warning saying "Buffer X newer than edits".
Searching through the Internet points me to this issue on neovim: neovim/neovim#12970.
A quick hack on neovim code shows that in my case, volar is reporting
text_document.version
as 5 while neovim is having14
.Volar is at version
0.38.1
.The text was updated successfully, but these errors were encountered: