Fix error without completion context

This commit is contained in:
Regen
2020-04-29 15:24:13 +09:00
parent 40d93525d9
commit 6bf08e0f14
2 changed files with 18 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ class CMakeLanguageServer(LanguageServer):
@self.feature(COMPLETION, trigger_characters=['{', '('])
def completions(params: CompletionParams):
if (params.context.triggerKind ==
if (hasattr(params, 'context') and params.context.triggerKind ==
CompletionTriggerKind.TriggerCharacter):
token = ''
trigger = params.context.triggerCharacter