Unnamed repository; edit this file 'description' to name the repository.
Add support for the Vento template language (#12147)
Co-authored-by: Michael Davis <[email protected]>
| -rw-r--r-- | book/src/generated/lang-support.md | 1 | ||||
| -rw-r--r-- | languages.toml | 11 | ||||
| -rw-r--r-- | runtime/queries/vento/highlights.scm | 13 | ||||
| -rw-r--r-- | runtime/queries/vento/injections.scm | 6 |
4 files changed, 31 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index f51e9bb1..31d1c563 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -225,6 +225,7 @@ | uxntal | ✓ | | | | | v | ✓ | ✓ | ✓ | `v-analyzer` | | vala | ✓ | ✓ | | `vala-language-server` | +| vento | ✓ | | | | | verilog | ✓ | ✓ | | `svlangserver` | | vhdl | ✓ | | | `vhdl_ls` | | vhs | ✓ | | | | diff --git a/languages.toml b/languages.toml index a1e6c6e0..2fab0053 100644 --- a/languages.toml +++ b/languages.toml @@ -3960,3 +3960,14 @@ language-servers = ["ada-gpr-language-server"] [[grammar]] name = "gpr" source = { git = "https://github.com/brownts/tree-sitter-gpr", rev = "cea857d3c18d1385d1f5b66cd09ea1e44173945c" } + +[[language]] +name = "vento" +scope = "text.html.vto" +file-types = ["vto"] +block-comment-tokens = { start = "{{#", end = "#}}" } +indent = { tab-width = 4, unit = " " } + +[[grammar]] +name = "vento" +source = { git = "https://github.com/ventojs/tree-sitter-vento", rev = "3321077d7446c1b3b017c294fd56ce028ed817fe" } diff --git a/runtime/queries/vento/highlights.scm b/runtime/queries/vento/highlights.scm new file mode 100644 index 00000000..4b0ba563 --- /dev/null +++ b/runtime/queries/vento/highlights.scm @@ -0,0 +1,13 @@ +(comment) @comment + +(keyword) @keyword + +(tag + [ + "{{" + "{{-" + "}}" + "-}}" + ] @punctuation.bracket) + +"|>" @operator diff --git a/runtime/queries/vento/injections.scm b/runtime/queries/vento/injections.scm new file mode 100644 index 00000000..2df98401 --- /dev/null +++ b/runtime/queries/vento/injections.scm @@ -0,0 +1,6 @@ +((content) @injection.content + (#set! injection.language "html") + (#set! injection.combined)) + +((code) @injection.content + (#set! injection.language "javascript")) |