feat: make SQL selectable as a language with syntax highlighting

This commit is contained in:
2026-07-04 23:54:16 -06:00
parent 89d42b8d0f
commit e5b2852fd1
5 changed files with 62 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { cpp } from "@codemirror/lang-cpp"
import { python } from "@codemirror/lang-python"
import { sql } from "@codemirror/lang-sql"
import { EditorState } from "@codemirror/state"
import { EditorView } from "@codemirror/view"
import { autocompletion, completeAnyWord } from "@codemirror/autocomplete"
@@ -57,6 +58,9 @@ const langExtension = computed(() => {
if (props.language === "python" || props.language === "turtle") {
return python()
}
if (props.language === "sql") {
return sql()
}
return cpp()
})