Minor fixes

- Add CompletionItemKind
- Don't require containerName in SumbolInformation
This commit is contained in:
smathot 2020-12-22 13:49:04 +01:00
parent 6bed7efdca
commit a10ed5327b

View File

@ -301,7 +301,7 @@ class SymbolInformation(object):
"""
Represents information about programming constructs like variables, classes, interfaces etc.
"""
def __init__(self, name, kind, location, containerName, deprecated=False):
def __init__(self, name, kind, location, containerName=None, deprecated=False):
"""
Constructs a new SymbolInformation instance.
@ -481,6 +481,34 @@ class CompletionItem(object):
self.score = score
class CompletionItemKind(enum.Enum):
Text = 1
Method = 2
Function = 3
Constructor = 4
Field = 5
Variable = 6
Class = 7
Interface = 8
Module = 9
Property = 10
Unit = 11
Value = 12
Enum = 13
Keyword = 14
Snippet = 15
Color = 16
File = 17
Reference = 18
Folder = 19
EnumMember = 20
Constant = 21
Struct = 22
Event = 23
Operator = 24
TypeParameter = 25
class CompletionList(object):
"""
Represents a collection of [completion items](#CompletionItem) to be presented in the editor.