mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -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
|
;;; Builtins
|
||||||
;; Keywords
|
;; 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"
|
"in"
|
||||||
] @repeat
|
|
||||||
|
|
||||||
[
|
|
||||||
"local"
|
"local"
|
||||||
"end"
|
|
||||||
"return"
|
"return"
|
||||||
(break_statement)
|
(break_statement)
|
||||||
"goto"
|
"goto"
|
||||||
|
|
@ -63,7 +69,7 @@
|
||||||
(spread) @constant ;; "..."
|
(spread) @constant ;; "..."
|
||||||
|
|
||||||
;; Nodes
|
;; 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)
|
(table ["{" "}"] @constructor)
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue