epocsquadron/add tree sitter twig (#1602)

* Add tree-sitter-twig grammer and highlights

The gammar itself is quite basic, but is much better than nothing
for working with real files consisting mostly of html.

* Docgen for newly added grammar
imgbot
Daniel S Poulin 2 years ago committed by GitHub
parent 983a53bfb4
commit d6b6ad879e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
.gitmodules vendored

@ -218,3 +218,7 @@
path = helix-syntax/languages/tree-sitter-iex
url = https://github.com/elixir-lang/tree-sitter-iex
shallow = true
[submodule "helix-syntax/languages/tree-sitter-twig"]
path = helix-syntax/languages/tree-sitter-twig
url = https://github.com/eirabben/tree-sitter-twig.git
shallow = true

@ -54,6 +54,7 @@
| toml | ✓ | | | |
| tsq | ✓ | | | |
| tsx | ✓ | | | `typescript-language-server` |
| twig | ✓ | | | |
| typescript | ✓ | | ✓ | `typescript-language-server` |
| vue | ✓ | | | |
| wgsl | ✓ | | | |

@ -0,0 +1 @@
Subproject commit b7444181fb38e603e25ea8fcdac55f9492e49c27

@ -231,6 +231,15 @@ roots = []
indent = { tab-width = 4, unit = " " }
[[language]]
name = "twig"
scope = "source.twig"
injection-regex = "twig"
file-types = ["twig"]
roots = []
indent = { tab-width = 2, unit = " " }
[[language]]
name = "latex"
scope = "source.tex"

@ -0,0 +1,16 @@
(comment_directive) @comment
[
"{%"
"{%-"
"{%~"
"%}"
"-%}"
"~%}"
"{{"
"{{-"
"{{~"
"}}"
"-}}"
"~}}"
] @keyword

@ -0,0 +1,3 @@
((content) @injection.content
(#set! injection.language "html")
(#set! injection.combined))
Loading…
Cancel
Save