Skip to content

Commit 5b6489b

Browse files
authored
remove re-calc of symbol table on switching to non-cypher file (#589)
1 parent 1e23703 commit 5b6489b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/vscode-extension/src/extension.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,16 @@ export async function activate(context: ExtensionContext) {
124124

125125
window.onDidChangeActiveTextEditor((editor) => {
126126
const doc = editor.document;
127-
const query = doc.getText();
128-
const uri = doc.uri.fsPath;
129-
const schema = getSchemaPoller().metadata?.dbSchema;
130-
void sendNotificationToLanguageClient('fetchSymbolTable', {
131-
query,
132-
uri,
133-
schema,
134-
});
127+
if (doc.languageId === 'cypher') {
128+
const query = doc.getText();
129+
const uri = doc.uri.fsPath;
130+
const schema = getSchemaPoller().metadata?.dbSchema;
131+
void sendNotificationToLanguageClient('fetchSymbolTable', {
132+
query,
133+
uri,
134+
schema,
135+
});
136+
}
135137
});
136138
}
137139

0 commit comments

Comments
 (0)