on master help sign in
Jinja language family syntax support (#7233)
57f093dIvan Isekeev
book/src/generated/lang-support.md+2
@@ -71,6 +71,7 @@
71| ini | ✓ | | | |
71| ini | ✓ | | | |
72| java | ✓ | ✓ | ✓ | `jdtls` |
72| java | ✓ | ✓ | ✓ | `jdtls` |
73| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
73| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
74+| jinja | ✓ | | | |
74| jsdoc | ✓ | | | |
75| jsdoc | ✓ | | | |
75| json | ✓ | | ✓ | `vscode-json-language-server` |
76| json | ✓ | | ✓ | `vscode-json-language-server` |
76| jsonnet | ✓ | | | `jsonnet-language-server` |
77| jsonnet | ✓ | | | `jsonnet-language-server` |
@@ -100,6 +101,7 @@
100| nim | ✓ | ✓ | ✓ | `nimlangserver` |
101| nim | ✓ | ✓ | ✓ | `nimlangserver` |
101| nix | ✓ | | | `nil` |
102| nix | ✓ | | | `nil` |
102| nu | ✓ | | | |
103| nu | ✓ | | | |
104+| nunjucks | ✓ | | | |
103| ocaml | ✓ | | ✓ | `ocamllsp` |
105| ocaml | ✓ | | ✓ | `ocamllsp` |
104| ocaml-interface | ✓ | | | `ocamllsp` |
106| ocaml-interface | ✓ | | | `ocamllsp` |
105| odin | ✓ | | ✓ | `ols` |
107| odin | ✓ | | ✓ | `ols` |
languages.toml+22
@@ -2702,6 +2702,28 @@ roots = []
2702indent = { tab-width = 2, unit = " " }
2702indent = { tab-width = 2, unit = " " }
2703grammar = "html"
2703grammar = "html"
2704
2704
2705+[[language]]
2706+name = "nunjucks"
2707+scope = "text.html.nunjucks"
2708+injection-regex = "nunjucks"
2709+file-types = ["njk"]
2710+roots = []
2711+indent = { tab-width = 2, unit = " " }
2712+grammar = "jinja2"
2713+
2714+[[language]]
2715+name = "jinja"
2716+scope = "text.html.jinja"
2717+injection-regex = "jinja"
2718+file-types = ["jinja", "jinja2", "j2"]
2719+roots = []
2720+indent = { tab-width = 2, unit = " " }
2721+grammar = "jinja2"
2722+
2723+[[grammar]]
2724+name = "jinja2"
2725+source = { git = "https://github.com/varpeti/tree-sitter-jinja2", rev = "a533cd3c33aea6acb0f9bf9a56f35dcfe6a8eb53" }
2726+
2705[[grammar]]
2727[[grammar]]
2706name = "wren"
2728name = "wren"
2707source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "793d58266924e6efcc40e411663393e9d72bec87"}
2729source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "793d58266924e6efcc40e411663393e9d72bec87"}
runtime/queries/jinja/highlights.scmnew file+7
@@ -0,0 +1,7 @@
1+(expression) @string
2+(statement) @variable.builtin
3+(keyword) @keyword
4+(comment) @comment
5+(identifier) @variable.parameter
6+(operator) @operator
7+(string) @string
runtime/queries/jinja/injections.scmnew file+4
@@ -0,0 +1,4 @@
1+((source_file) @injection.content
2+ (#set! injection.combined)
3+ (#set! injection.include-children)
4+ (#set! injection.language "html"))
runtime/queries/nunjucks/highlights.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: jinja
runtime/queries/nunjucks/injections.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: jinja