mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
highlight(lua): fix overlapping queries
This commit is contained in:
parent
63c1853674
commit
d4cf41f46b
1 changed files with 22 additions and 16 deletions
|
|
@ -2,25 +2,31 @@
|
|||
|
||||
;;; Builtins
|
||||
;; Keywords
|
||||
(
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
"elseif"
|
||||
] @conditional
|
||||
"end" @confitional
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
[
|
||||
"do"
|
||||
"while"
|
||||
"repeat"
|
||||
"for"
|
||||
] @repeat
|
||||
|
||||
"end" @repeat
|
||||
)
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
"elseif"
|
||||
] @conditional
|
||||
|
||||
[
|
||||
"do"
|
||||
"while"
|
||||
"repeat"
|
||||
"for"
|
||||
"in"
|
||||
] @repeat
|
||||
|
||||
[
|
||||
"local"
|
||||
"end"
|
||||
"return"
|
||||
(break_statement)
|
||||
"goto"
|
||||
|
|
@ -63,7 +69,7 @@
|
|||
(spread) @constant ;; "..."
|
||||
|
||||
;; Nodes
|
||||
(_ "function" @function "end" @function) ;; Any node that has both funtion and end in it
|
||||
("function" @function "end" @function) ;; Any node that has both funtion and end in it
|
||||
|
||||
(table ["{" "}"] @constructor)
|
||||
(comment) @comment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue