Files
openidea/languages/svelte.toml
T
Bert Verhelstandbertyhell 5a0bd7d1fc feat(editor): rainbow brackets for generics and markup tags, with kind switches and 2–5 colours (#3832)
Rainbow brackets get per-kind switches (round, square, curly, and angle brackets and tags) and a palette length of 2–5 colours; defaults are unchanged. Angle brackets are coloured only inside syntax nodes a language definition names under [rainbow-brackets] (type argument/parameter lists for TypeScript/TSX, Java, Rust and C++; tags for HTML, XML, Vue, Svelte and JSX), so comparisons and shifts stay uncoloured. A kind switched off keeps the other brackets' depths. Colour schemes gain --syn-bracket-4/5; indent guides and sticky lines follow the palette length.

Closes #3769

Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>
2026-11-17 03:41:02 +08:00

61 lines
2.4 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
id = "svelte"
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"
# Rainbow brackets › angle: editor syntax nodes of markup tags, whose `<` `>` pair up.
[rainbow-brackets]
tags = ["OpenTag", "CloseTag", "SelfClosingTag"]
[[language-servers]]
name = "svelte-language-server"
command = "svelteserver"
args = ["--stdio"]
root-markers = ["svelte.config.js", "svelte.config.mjs", "svelte.config.ts", "package.json"]
install-hint = "npm i -g svelte-language-server"
[[language-servers]]
name = "oxlint"
command = "oxlint"
args = ["--lsp"]
root-markers = [".oxlintrc.json", ".oxlintrc.jsonc", "oxlint.config.ts", "oxlint.config.mts"]
require-root-marker = true
install-hint = "npm i -D oxlint"
# ESLint: only below a project's ESLint configuration; the server runs the project's own eslint.
[[language-servers]]
name = "eslint"
command = "vscode-eslint-language-server"
args = ["--stdio"]
root-markers = ["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs", "eslint.config.ts", "eslint.config.mts", "eslint.config.cts", ".eslintrc", ".eslintrc.js", ".eslintrc.cjs", ".eslintrc.json", ".eslintrc.yml", ".eslintrc.yaml", "package.json#eslintConfig"]
require-root-marker = true
install-hint = "npm i -g vscode-langservers-extracted"
[language-servers.settings]
# Read by every request (`experimental.useFlatConfig`); ESLint picks flat or legacy config itself.
experimental = {}
validate = "on"
run = "onType"
quiet = false
onIgnoredFiles = "off"
rulesCustomizations = []
nodePath = ""
problems = { shortenToSingleLine = false }
workingDirectory = { mode = "auto" }
codeAction = { disableRuleComment = { enable = true, location = "separateLine" }, showDocumentation = { enable = true } }
# vscode-eslint reads it for every source.fixAll request (Actions on Save, Code Cleanup).
# No `rules`: an empty list there means no rule gets fixed.
codeActionOnSave = { mode = "all" }
# Components run in the browser: breakpoints in them are hit by a JavaScript Debug configuration.
[debugger]
adapter = "js-debug"
command = "js-debug-adapter"
args = ["${port}", "127.0.0.1"]
transport = "tcp"
install-hint = "Install JavaScript Debugger (vscode-js-debug) in Settings › Languages & Frameworks › Language Servers"