Jinja language family syntax support (#7233)

* feat: add jinja language support

* feat: add nunjucks language support

* feat: add to lang support book jinja and nunjucks languages
This commit is contained in:
Ivan Isekeev 2023-08-09 20:26:58 +06:00 committed by GitHub
parent c0eae84073
commit 57f093d836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 0 deletions

View File

@ -71,6 +71,7 @@
| ini | ✓ | | | | | ini | ✓ | | | |
| java | ✓ | ✓ | ✓ | `jdtls` | | java | ✓ | ✓ | ✓ | `jdtls` |
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` | | javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
| jinja | ✓ | | | |
| jsdoc | ✓ | | | | | jsdoc | ✓ | | | |
| json | ✓ | | ✓ | `vscode-json-language-server` | | json | ✓ | | ✓ | `vscode-json-language-server` |
| jsonnet | ✓ | | | `jsonnet-language-server` | | jsonnet | ✓ | | | `jsonnet-language-server` |
@ -100,6 +101,7 @@
| nim | ✓ | ✓ | ✓ | `nimlangserver` | | nim | ✓ | ✓ | ✓ | `nimlangserver` |
| nix | ✓ | | | `nil` | | nix | ✓ | | | `nil` |
| nu | ✓ | | | | | nu | ✓ | | | |
| nunjucks | ✓ | | | |
| ocaml | ✓ | | ✓ | `ocamllsp` | | ocaml | ✓ | | ✓ | `ocamllsp` |
| ocaml-interface | ✓ | | | `ocamllsp` | | ocaml-interface | ✓ | | | `ocamllsp` |
| odin | ✓ | | ✓ | `ols` | | odin | ✓ | | ✓ | `ols` |

View File

@ -2702,6 +2702,28 @@ roots = []
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
grammar = "html" grammar = "html"
[[language]]
name = "nunjucks"
scope = "text.html.nunjucks"
injection-regex = "nunjucks"
file-types = ["njk"]
roots = []
indent = { tab-width = 2, unit = " " }
grammar = "jinja2"
[[language]]
name = "jinja"
scope = "text.html.jinja"
injection-regex = "jinja"
file-types = ["jinja", "jinja2", "j2"]
roots = []
indent = { tab-width = 2, unit = " " }
grammar = "jinja2"
[[grammar]]
name = "jinja2"
source = { git = "https://github.com/varpeti/tree-sitter-jinja2", rev = "a533cd3c33aea6acb0f9bf9a56f35dcfe6a8eb53" }
[[grammar]] [[grammar]]
name = "wren" name = "wren"
source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "793d58266924e6efcc40e411663393e9d72bec87"} source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "793d58266924e6efcc40e411663393e9d72bec87"}

View File

@ -0,0 +1,7 @@
(expression) @string
(statement) @variable.builtin
(keyword) @keyword
(comment) @comment
(identifier) @variable.parameter
(operator) @operator
(string) @string

View File

@ -0,0 +1,4 @@
((source_file) @injection.content
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "html"))

View File

@ -0,0 +1 @@
; inherits: jinja

View File

@ -0,0 +1 @@
; inherits: jinja