mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
Elixir: fix a few highlights, add ExUnit support to locals (#1933)
* Fix "not in" and sigil highlights * Add ExUnit test case to locals * Update README to mention new Elixir parser
This commit is contained in:
parent
57d3126ac1
commit
97819053c8
2 changed files with 37 additions and 13 deletions
|
|
@ -163,6 +163,7 @@
|
||||||
[
|
[
|
||||||
"and"
|
"and"
|
||||||
"in"
|
"in"
|
||||||
|
"not in"
|
||||||
"not"
|
"not"
|
||||||
"or"
|
"or"
|
||||||
] @keyword.operator
|
] @keyword.operator
|
||||||
|
|
@ -208,17 +209,10 @@
|
||||||
(unary_operator
|
(unary_operator
|
||||||
operator: "@" @comment
|
operator: "@" @comment
|
||||||
operand: (call
|
operand: (call
|
||||||
target: (((identifier) @comment) @_identifier
|
target: (((identifier) @comment) @_identifier)
|
||||||
(#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
|
||||||
(arguments [
|
(arguments [
|
||||||
(string) @comment
|
(string) @comment
|
||||||
(charlist) @comment
|
(charlist) @comment
|
||||||
(sigil
|
(boolean) @comment
|
||||||
"~" @comment
|
]))
|
||||||
(sigil_name) @comment
|
(#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
||||||
quoted_start: _ @comment
|
|
||||||
(quoted_content) @comment
|
|
||||||
quoted_end: _ @comment
|
|
||||||
((sigil_modifiers) @comment)?)
|
|
||||||
(boolean) @comment
|
|
||||||
])))
|
|
||||||
|
|
|
||||||
|
|
@ -130,5 +130,35 @@
|
||||||
(do_block)?
|
(do_block)?
|
||||||
) @scope
|
) @scope
|
||||||
|
|
||||||
|
; ExUnit Test Definitions & Scopes
|
||||||
|
(call
|
||||||
|
target: ((identifier) @_identifier (#eq? @_identifier "test"))
|
||||||
|
(arguments [
|
||||||
|
(string)
|
||||||
|
((string) . "," . [
|
||||||
|
(identifier) @definition.parameter
|
||||||
|
(_ (identifier) @definition.parameter)
|
||||||
|
(_ (_ (identifier) @definition.parameter))
|
||||||
|
(_ (_ (_ (identifier) @definition.parameter)))
|
||||||
|
(_ (_ (_ (_ (identifier) @definition.parameter))))
|
||||||
|
(_ (_ (_ (_ (_ (identifier) @definition.parameter)))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter)))))))))))))))))))
|
||||||
|
(_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @definition.parameter))))))))))))))))))))
|
||||||
|
])
|
||||||
|
]) (do_block)?) @scope
|
||||||
|
|
||||||
; Stab Clause Scopes
|
; Stab Clause Scopes
|
||||||
(stab_clause) @scope
|
(stab_clause) @scope
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue