-
Notifications
You must be signed in to change notification settings - Fork 133
CompletionItemKind of 0 (None) causes language server clients to fail #1531
Comments
Unfortunately, there is no enum item for "I don't know what it is" i.e. |
|
That, or do what the VS Code client does and convert any invalid choices to |
|
Thank you for looking into this! I would say either
|
#1482 includes that second item. Note that the protocol does say that it can be null, so hopefully the vim language server client could accept that. |
x = a
|
Unknown happens all the time when we can't infer something, so it's going to show up as members of classes, in the global scope, etc; making sure we include those items is pretty critical. Using |
Looking through LanguageClient-neovim, I found that it uses the lsp-types crate for parsing the messages sent back from a Language Server. The version it currently uses, 0.60.0, has |
That's reasonable, we just can't change it without some extra work for users of the LS's public API (which includes completion items). Changing it to |
Thanks! Here's the relevant commit for anyone arriving at this issue later: 8e3289c#diff-d1348423ac842b3fb8e33aaafe1b10de Is there an issue tracking changing this to |
Not at the moment, no. Feel free to make one. |
Environment data
master
branch (last compiled on51b2532ddc0161aecadda182b33f1b15ed6093b0
Expected behaviour
Python Language Server emits valid completion items.
Actual behaviour
Python Language Server emits completion items with
kind
value of0
as described in autozimu/LanguageClient-neovim#633 (comment)Zero is not a valid
CompletionItemKind
according to the Language Server specificationhttps://microsoft.github.io/language-server-protocol/specification
The result of Python Language Server emitting completion items with
"kind":0
breaks completion for language clients, like LanguageClient-neovim, that are set up to handle the Language Client spec.Logs
N/A
Code Snippet / Additional lnformation
The example I gave in autozimu/LanguageClient-neovim#633 (comment) was
The text was updated successfully, but these errors were encountered: