feat(editor): polish SQL autocomplete UI

This commit is contained in:
t8y2 committed 2026-05-19 12:33:05 +08:00
1 parent cf46aec158
commit 653feb7c65
3 files changed
+123 -2

No files matched your search

@@ -14,7 +14,7 @@ import {
} from "@/lib/sqlCompletion";
import { extractIdentifierAt, isSqlKeyword, matchTable } from "@/lib/sqlNavigation";
import { lineColumnToOffset, parseSqlErrorLocation } from "@/lib/sqlDiagnostics";
import { loadEditorTheme, editorFontTheme } from "@/lib/editorThemes";
import { loadEditorTheme, editorFontTheme, sqlCompletionTheme } from "@/lib/editorThemes";
import { shortcutToCodeMirrorKey } from "@/lib/shortcutRegistry";
import type { SqlCompletionColumn } from "@/lib/sqlCompletion";
@@ -485,7 +485,7 @@ async function provideSqlCompletions(
})
: {
label: item.label,
type: item.type === "keyword" ? "keyword" : item.type === "table" ? "class" : "property",
type: item.type,
detail: item.detail,
boost: item.boost,
},
@@ -595,6 +595,7 @@ onMounted(async () => {
async (context: CompletionContext) => provideSqlCompletions(context.state, context.pos, context.explicit),
],
}),
sqlCompletionTheme(EditorView),
codeMirrorTheme.of(theme),
closeBrackets(),
bracketMatching(),