add tree-sitter-eex
EEx is an templating language for Elixir. Since the incremental parsing refactor we can used combined injections which allows us to add EEx support.
This commit is contained in:
parent
4ac94a5c43
commit
9d095e0fdc
4 changed files with 28 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
| css | ✓ | | | `vscode-css-language-server` |
|
| css | ✓ | | | `vscode-css-language-server` |
|
||||||
| dart | ✓ | | ✓ | `dart` |
|
| dart | ✓ | | ✓ | `dart` |
|
||||||
| dockerfile | ✓ | | | `docker-langserver` |
|
| dockerfile | ✓ | | | `docker-langserver` |
|
||||||
|
| eex | ✓ | | | |
|
||||||
| ejs | ✓ | | | |
|
| ejs | ✓ | | | |
|
||||||
| elixir | ✓ | | | `elixir-ls` |
|
| elixir | ✓ | | | `elixir-ls` |
|
||||||
| elm | ✓ | | | `elm-language-server` |
|
| elm | ✓ | | | `elm-language-server` |
|
||||||
|
|
|
@ -1113,3 +1113,15 @@ grammar = "embedded-template"
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "embedded-template"
|
name = "embedded-template"
|
||||||
source = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template", rev = "d21df11b0ecc6fd211dbe11278e92ef67bd17e97" }
|
source = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template", rev = "d21df11b0ecc6fd211dbe11278e92ef67bd17e97" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "eex"
|
||||||
|
scope = "source.eex"
|
||||||
|
injection-regex = "eex"
|
||||||
|
file-types = ["eex"]
|
||||||
|
roots = []
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "eex"
|
||||||
|
source = { git = "https://github.com/connorlay/tree-sitter-eex", rev = "f742f2fe327463335e8671a87c0b9b396905d1d1" }
|
||||||
|
|
6
runtime/queries/eex/highlights.scm
Normal file
6
runtime/queries/eex/highlights.scm
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
; https://github.com/connorlay/tree-sitter-eex/blob/f742f2fe327463335e8671a87c0b9b396905d1d1/queries/highlights.scm
|
||||||
|
|
||||||
|
; wrapping in (directive .. ) prevents us from highlighting '%>' in a comment as a keyword
|
||||||
|
(directive ["<%" "<%=" "<%%" "<%%=" "%>"] @keyword)
|
||||||
|
|
||||||
|
(comment) @comment
|
9
runtime/queries/eex/injections.scm
Normal file
9
runtime/queries/eex/injections.scm
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
; https://github.com/connorlay/tree-sitter-eex/blob/f742f2fe327463335e8671a87c0b9b396905d1d1/queries/injections.scm
|
||||||
|
|
||||||
|
((directive (expression) @injection.content)
|
||||||
|
(#set! injection.language "elixir"))
|
||||||
|
|
||||||
|
((partial_expression) @injection.content
|
||||||
|
(#set! injection.language "elixir")
|
||||||
|
(#set! injection.include-children)
|
||||||
|
(#set! injection.combined))
|
Loading…
Add table
Reference in a new issue