mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
Lua: fix loop and conditional keywords highlights
This commit is contained in:
parent
02735aae55
commit
5504b84d21
1 changed files with 33 additions and 15 deletions
|
|
@ -2,27 +2,45 @@
|
|||
|
||||
;;; Builtins
|
||||
;; Keywords
|
||||
(
|
||||
"if" @conditional
|
||||
"end" @conditional
|
||||
)
|
||||
|
||||
(if_statement
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"end"
|
||||
] @conditional)
|
||||
|
||||
[
|
||||
"else"
|
||||
"elseif"
|
||||
"then"
|
||||
] @conditional
|
||||
] @contional
|
||||
|
||||
|
||||
(
|
||||
[
|
||||
"do"
|
||||
"while"
|
||||
"repeat"
|
||||
(for_statement
|
||||
[
|
||||
"for"
|
||||
] @repeat
|
||||
"do"
|
||||
"end"
|
||||
] @repeat)
|
||||
|
||||
"end" @repeat
|
||||
)
|
||||
(for_in_statement
|
||||
[
|
||||
"for"
|
||||
"do"
|
||||
"end"
|
||||
] @repeat)
|
||||
|
||||
(while_statement
|
||||
[
|
||||
"while"
|
||||
"do"
|
||||
"end"
|
||||
] @repeat)
|
||||
|
||||
(repeat_statement
|
||||
[
|
||||
"repeat"
|
||||
"until"
|
||||
] @repeat)
|
||||
|
||||
[
|
||||
"in"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue