Skip to content

Commit

Permalink
feat: add editor extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
invm committed Sep 10, 2023
1 parent 3b7560c commit 39cfc6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const QueryTab = () => {
const {
connectionsService: { getActiveContentTab },
} = useAppSelector();
const data = createEffect(() => {
createEffect(() => {
const q = Split(["#query", "#results"], {
sizes: [40, 60],
minSize: [100, 400],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import {
createEditorFocus,
} from "solid-codemirror";
import { createSignal, onMount, Show } from "solid-js";
import { lineNumbers, EditorView } from "@codemirror/view";
import {
lineNumbers,
EditorView,
drawSelection,
highlightWhitespace,
highlightActiveLine,
} from "@codemirror/view";
import { sql } from "@codemirror/lang-sql";
import { dracula } from "@uiw/codemirror-theme-dracula";
import { format } from "sql-formatter";
Expand Down Expand Up @@ -45,6 +51,9 @@ export const QueryTextArea = () => {
createEditorControlledValue(editorView, code);
createExtension(() => lineNumbers());
createExtension(() => sql());
createExtension(() => drawSelection());
createExtension(() => highlightWhitespace());
createExtension(() => highlightActiveLine());
createExtension(dracula);
const { setFocused } = createEditorFocus(editorView);

Expand Down

0 comments on commit 39cfc6e

Please sign in to comment.