Skip to content

Commit

Permalink
fixed bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson4j committed Jan 7, 2025
1 parent da71532 commit 0f67eb2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0f67eb2

Please sign in to comment.