fix(languages): highlight .svelte files via the HTML ui mode (#627)

`.svelte` files got highlighting only from semantic tokens, because the language had no `ui-mode` and no CodeMirror language loaded. It now uses the HTML mode, which parses `<script lang="ts">` as TypeScript and `<style>` as CSS. Svelte blocks and markup expressions stay plain text.

Closes #626

Co-authored-by: a-rookie-of-C-language <186315048+a-rookie-of-C-language@users.noreply.github.com>
This commit is contained in:
arookieofcanda-rookie-of-C-language authored and GitHub committed 2026-11-01 09:51:22 +08:00
1 parent 52cb592692
commit 1e913c2334
1 file changed
+3
+3
View File
@@ -3,6 +3,9 @@ name = "Svelte"
extensions = ["svelte"]
block-comment = ["<!--", "-->"]
indent = { tab-size = 2, insert-spaces = true }
# No Svelte mode ships with @codemirror/language-data; the HTML mode already
# parses <script> as TypeScript and <style> as CSS, so components get highlighted.
ui-mode = "HTML"
[[language-servers]]
name = "svelte-language-server"