Skip to content

Commit

Permalink
change: update completion logic
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul committed Apr 24, 2024
1 parent 7d04837 commit 7673604
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util/editor/extensions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { linter } from "@codemirror/lint";
import { surrealql } from "codemirror-surrealql";
import { surrealql, surrealqlLanguage } from "codemirror-surrealql";
import { getSetting } from "../config";
import { defaultKeymap, history, historyKeymap, indentWithTab } from "@codemirror/commands";
import { searchKeymap, highlightSelectionMatches } from "@codemirror/search";
Expand All @@ -11,7 +11,6 @@ import { themeColor } from "../mantine";
import { EditorState, Extension, SelectionRange } from "@codemirror/state";
import { acceptWithTab, runQuery } from "./keybinds";
import { DARK_STYLE, LIGHT_STYLE } from "./theme";
import { StandardSQL } from "@codemirror/lang-sql";
import { useDatabaseStore } from "~/stores/database";
import { getActiveQuery } from "../connection";
import { tryParseParams } from "../helpers";
Expand Down Expand Up @@ -160,7 +159,7 @@ const TABLE_SOURCE: CompletionSource = (context) => {
* An extension used to autocomplete table names
*/
export const surqlTableCompletion = (): Extension => {
return StandardSQL.language.data.of({
return surrealqlLanguage.data.of({
autocomplete: TABLE_SOURCE
});
};
Expand Down Expand Up @@ -189,7 +188,7 @@ const VARIABLE_SOURCE: CompletionSource = (context) => {
* An extension used to autocomplete query variables
*/
export const surqlVariableCompletion = (): Extension => {
return StandardSQL.language.data.of({
return surrealqlLanguage.data.of({
autocomplete: VARIABLE_SOURCE
});
};
Expand Down

0 comments on commit 7673604

Please sign in to comment.