diff --git a/packages/langium/src/lsp/completion/completion-provider.ts b/packages/langium/src/lsp/completion/completion-provider.ts index 1df7693a1..73d8a53a3 100644 --- a/packages/langium/src/lsp/completion/completion-provider.ts +++ b/packages/langium/src/lsp/completion/completion-provider.ts @@ -472,12 +472,16 @@ export class DefaultCompletionProvider implements CompletionProvider { } acceptor(context, { label: keyword.value, - kind: CompletionItemKind.Keyword, + kind: this.getKeywordCompletionItemKind(keyword), detail: 'Keyword', sortText: '1' }); } + protected getKeywordCompletionItemKind(_keyword: ast.Keyword): CompletionItemKind { + return CompletionItemKind.Keyword; + } + protected filterKeyword(context: CompletionContext, keyword: ast.Keyword): boolean { // Filter out keywords that do not contain any word character return /\p{L}/u.test(keyword.value);