Skip to content

Commit

Permalink
Add support for the Vento template language (#12147)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Davis <[email protected]>
  • Loading branch information
uncenter and the-mikedavis authored Dec 2, 2024
1 parent 44c1d51 commit 548f04f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
| uxntal || | | |
| v |||| `v-analyzer` |
| vala ||| | `vala-language-server` |
| vento || | | |
| verilog ||| | `svlangserver` |
| vhdl || | | `vhdl_ls` |
| vhs || | | |
Expand Down
11 changes: 11 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
13 changes: 13 additions & 0 deletions runtime/queries/vento/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(comment) @comment

(keyword) @keyword

(tag
[
"{{"
"{{-"
"}}"
"-}}"
] @punctuation.bracket)

"|>" @operator
6 changes: 6 additions & 0 deletions runtime/queries/vento/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
((content) @injection.content
(#set! injection.language "html")
(#set! injection.combined))

((code) @injection.content
(#set! injection.language "javascript"))

0 comments on commit 548f04f

Please sign in to comment.