feat(editor): configure SQL completion column ordering

Closes #5955
This commit is contained in:
t8y2 committed 2026-08-13 06:54:51 +00:00
1 parent 31a7609604
commit 18d581137c
10 files changed
+157 -3

No files matched your search

@@ -101,7 +101,7 @@ import { EDITOR_FONT_FAMILY_CSS_VAR, EDITOR_FONT_SIZE_CSS_VAR, loadEditorTheme,
import { createStatementGutterMarkerDom, shouldShowStatementGutter } from "@/lib/editor/codemirrorStatementGutter";
import { createQueryEditorSearchKeymap } from "@/lib/editor/queryEditorSearchKeymap";
import { appendSqlCompletionSpace } from "@/lib/editor/sqlCompletionInsertion";
import { completionLabelPresentation } from "@/lib/editor/sqlCompletionPresentation";
import { compareSqlCompletions, completionLabelPresentation } from "@/lib/editor/sqlCompletionPresentation";
import { clampEditorFontSize, createEditorZoomCommitScheduler, fontSizeFromGestureScale, fontSizeFromWheelDelta } from "@/lib/editor/editorZoom";
import { normalizeShortcutSettings, shortcutToCodeMirrorKey } from "@/lib/editor/shortcutRegistry";
import { trimmedSelectionLayer } from "@/lib/editor/codemirrorTrimmedSelectionLayer";
@@ -4587,6 +4587,7 @@ onMounted(async () => {
buildSqlCompletionExtension = () =>
autocompletion({
activateOnTyping: true,
compareCompletions: (a, b) => compareSqlCompletions(a, b, settingsStore.editorSettings.sortCompletionColumnsAlphabetically),
override: [async (context: CompletionContext) => provideSqlCompletions(context)],
});
@@ -5400,7 +5401,7 @@ watch(
);
watch(
() => settingsStore.editorSettings.snippets,
() => [settingsStore.editorSettings.snippets, settingsStore.editorSettings.sortCompletionColumnsAlphabetically],
() => {
completionEpoch++;
if (!view.value || !completionComp || !buildSqlCompletionExtension) return;