mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add tree-sitter-eex parser for (L)EEx files (#2351)
This commit is contained in:
parent
d2981d20da
commit
2532937ba1
4 changed files with 35 additions and 0 deletions
|
|
@ -343,6 +343,16 @@ list.surface = {
|
|||
maintainers = { "@connorlay" },
|
||||
}
|
||||
|
||||
list.eex = {
|
||||
install_info = {
|
||||
url = "https://github.com/connorlay/tree-sitter-eex",
|
||||
files = { "src/parser.c" },
|
||||
branch = "main",
|
||||
},
|
||||
filetype = "eex",
|
||||
maintainers = { "@connorlay" },
|
||||
}
|
||||
|
||||
list.heex = {
|
||||
install_info = {
|
||||
url = "https://github.com/connorlay/tree-sitter-heex",
|
||||
|
|
|
|||
15
queries/eex/highlights.scm
Normal file
15
queries/eex/highlights.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
"%>"
|
||||
"--%>"
|
||||
"<%!--"
|
||||
"<%"
|
||||
"<%#"
|
||||
"<%%="
|
||||
"<%="
|
||||
] @tag.delimiter
|
||||
|
||||
; EEx comments are highlighted as such
|
||||
(comment) @comment
|
||||
|
||||
; Tree-sitter parser errors
|
||||
(ERROR) @error
|
||||
5
queries/eex/injections.scm
Normal file
5
queries/eex/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
; EEx expressions are Elixir
|
||||
(expression) @elixir
|
||||
|
||||
; EEx expressions can span multiple interpolated lines
|
||||
(partial_expression) @elixir @combined
|
||||
|
|
@ -24,6 +24,11 @@
|
|||
(#eq? @_sigil_name "F"))
|
||||
|
||||
; Zigler
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @eex
|
||||
(#any-of? @_sigil_name "E" "L"))
|
||||
|
||||
(sigil
|
||||
(sigil_name) @_sigil_name
|
||||
(quoted_content) @zig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue