-
Notifications
You must be signed in to change notification settings - Fork 45
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
Error on empty lines #327
Comments
Position comes from the client so this looks like a client error. Though this works fine for me - and presumably also for everyone else. |
I'm not sure that is the case. I thought jedi-language-server had solved this internally. But AFAIK LSP allows character positions bigger than the line length: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position It's a bit sub-optimal that Jedi doesn't allow for this. Maybe we should just allow this within Jedi? But then again it really looks like the client is wrong here, because within VIM character positions should always be "valid" positions. (At least AFAIK) |
I dont think jedi-language-server does anything about over-large jedi-language-server/jedi_language_server/jedi_utils.py Lines 332 to 353 in 112aa02
I agree that the spec seems to require language servers to tolerate such things, and my unconsidered hot take would be that it makes sense for that to happen in jedi rather than making this project do the work. However I also agree that it looks as though the client is wrong - and as a vim user I have never seen this myself (and do not reproduce it now). |
After opening a document
I use:
NVIM v0.11.0-dev-1228+g9e7b0bcf51
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260
Run "nvim -V1 -v" for more inf
lsp version:
jedi-language-server jedi_language_server
A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
The text was updated successfully, but these errors were encountered: