diff --git a/packages/language-support/src/autocompletion/completionCoreCompletions.ts b/packages/language-support/src/autocompletion/completionCoreCompletions.ts index 9685da13..4d25203c 100644 --- a/packages/language-support/src/autocompletion/completionCoreCompletions.ts +++ b/packages/language-support/src/autocompletion/completionCoreCompletions.ts @@ -474,6 +474,8 @@ export function completionCoreCompletion( // this rule is used for usernames and roles. CypherParser.RULE_commandNameExpression, CypherParser.RULE_procedureResultItem, + CypherParser.RULE_cypherVersion, + CypherParser.RULE_cypher, // Either enable the helper rules for lexer clashes, // or collect all console commands like below with symbolicNameString @@ -509,6 +511,20 @@ export function completionCoreCompletion( const ruleCompletions = Array.from(candidates.rules.entries()).flatMap( (candidate): CompletionItem[] => { const [ruleNumber, candidateRule] = candidate; + if (ruleNumber === CypherParser.RULE_cypher) { + return [ + ...cypherVersionCompletions(), + { + label: 'CYPHER', + kind: CompletionItemKind.Keyword, + }, + ]; + } + + if (ruleNumber === CypherParser.RULE_cypherVersion) { + return versionCompletions(); + } + if (ruleNumber === CypherParser.RULE_procedureResultItem) { const callContext = findParent( parsingResult.stopNode.parentCtx,