Files
openidea/languages/html.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

51 lines
1.9 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 = "html"
name = "HTML"
formatter = { tool = "prettier", parser = "html", range = false }
extensions = ["html", "htm", "xhtml", "shtml", "html.tmpl"]
first-line = "^\\s*<!(?i:doctype)\\s+html"
block-comment = ["<!--", "-->"]
indent = { tab-size = 2, insert-spaces = true }
ui-mode = "HTML"
tree-sitter = "html"
# Rainbow brackets › angle: editor syntax nodes of markup tags, whose `<` `>` pair up.
[rainbow-brackets]
tags = ["OpenTag", "CloseTag", "SelfClosingTag"]
# Angular projects: component templates, with bindings and interpolations
# highlighted as expressions.
[[framework-ui-modes]]
ui-mode = "Angular Template"
root-markers = ["angular.json", "node_modules/@angular/core"]
# Spring MVC projects: Thymeleaf templates, with `th:*` attribute values
# highlighted as Thymeleaf expressions.
[[framework-ui-modes]]
ui-mode = "Thymeleaf"
root-markers = ["src/main/resources/templates"]
# Angular projects only: component templates. First, so that hover, rename and
# document symbols of templates come from it rather than plain HTML.
[[language-servers]]
name = "angular-language-server"
command = "ngserver"
args = ["--stdio", "--includeCompletionsWithSnippetText", "--includeAutomaticOptionalChainCompletions"]
root-markers = ["angular.json", "node_modules/@angular/core"]
require-root-marker = true
install-hint = "npm i -g @angular/language-server"
[[language-servers]]
name = "vscode-html-language-server"
command = "vscode-html-language-server"
args = ["--stdio"]
initialization-options = { provideFormatter = true, embeddedLanguages = { css = true, javascript = true } }
install-hint = "npm i -g vscode-langservers-extracted"
# Scripts in a page 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"