-
Notifications
You must be signed in to change notification settings - Fork 282
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
Completion requests with column positions greater than the line length don't work (LSP implementation issue) #193
Comments
The jedi maintainer refuses to fix this, so this issue will have to be handled here. |
I agree it makes sense to fix here as it’s a peculiarity of the protocol. Jedi is not incorrect to throw in this case.
…________________________________
From: w0rp <notifications@github.com>
Sent: Wednesday, November 22, 2017 8:34:55 PM
To: palantir/python-language-server
Cc: Subscribed
Subject: Re: [palantir/python-language-server] Completion requests with column positions greater than the line length don't work (LSP implementation issue) (#193)
The jedi maintainer refuses to fix this, so this issue will have to be handled here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#193 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AB1rdB5-bWwNIfkIROeD9VLMiN6JnOmoks5s5IVvgaJpZM4QmN1y>.
|
Okay. |
I have forked to solve this issue with a PR, but I'm unsure how I might be able to get the current line's length from within |
I think you want to find the line under the position using the Document class |
The LSP protocol document says that
character
values for the position, used for methods liketextDocument/completion
should accept values greater than the length of a line. https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#positionHowever, validation in
jedi
causes an exception to be thrown.The ideal way to fix this would be to remove the validation in
jedi
, and make it usecolumn = min(column, line_len)
instead.The text was updated successfully, but these errors were encountered: