This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
CompletionItemKind of 0 (None) causes language server clients to fail #1531
Closed
Description
Environment data
- Language Server version:
master
branch (last compiled on51b2532ddc0161aecadda182b33f1b15ed6093b0
- OS and version: MacOS 10.14.6
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.4
Expected behaviour
Python Language Server emits valid completion items.
Actual behaviour
Python Language Server emits completion items with kind
value of 0
as described in autozimu/LanguageClient-neovim#633 (comment)
Zero is not a valid CompletionItemKind
according to the Language Server specification
https://microsoft.github.io/language-server-protocol/specification
/** * The kind of a completion entry. */ namespace CompletionItemKind { export const Text = 1; export const Method = 2; export const Function = 3; export const Constructor = 4; export const Field = 5; export const Variable = 6; export const Class = 7; export const Interface = 8; export const Module = 9; export const Property = 10; export const Unit = 11; export const Value = 12; export const Enum = 13; export const Keyword = 14; export const Snippet = 15; export const Color = 16; export const File = 17; export const Reference = 18; export const Folder = 19; export const EnumMember = 20; export const Constant = 21; export const Struct = 22; export const Event = 23; export const Operator = 24; export const TypeParameter = 25; }
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
import logging
logging.getLogge