feat: make SQL selectable as a language with syntax highlighting
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user