mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -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"
|
||||
"in"
|
||||
"not in"
|
||||
"not"
|
||||
"or"
|
||||
] @keyword.operator
|
||||
|
|
@ -208,17 +209,10 @@
|
|||
(unary_operator
|
||||
operator: "@" @comment
|
||||
operand: (call
|
||||
target: (((identifier) @comment) @_identifier
|
||||
(#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
||||
target: (((identifier) @comment) @_identifier)
|
||||
(arguments [
|
||||
(string) @comment
|
||||
(charlist) @comment
|
||||
(sigil
|
||||
"~" @comment
|
||||
(sigil_name) @comment
|
||||
quoted_start: _ @comment
|
||||
(quoted_content) @comment
|
||||
quoted_end: _ @comment
|
||||
((sigil_modifiers) @comment)?)
|
||||
(boolean) @comment
|
||||
])))
|
||||
(string) @comment
|
||||
(charlist) @comment
|
||||
(boolean) @comment
|
||||
]))
|
||||
(#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
||||
|
|
|
|||
|
|
@ -130,5 +130,35 @@
|
|||
(do_block)?
|
||||
) @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) @scope
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue