mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlight(lua): add more operators
This commit is contained in:
parent
d05728e155
commit
c4862c656e
1 changed files with 25 additions and 1 deletions
|
|
@ -13,24 +13,48 @@
|
|||
"while" @keyword
|
||||
"repeat" @keyword
|
||||
"for" @keyword
|
||||
(break_statement) @keyword
|
||||
"goto" @keyword
|
||||
|
||||
;; Operators
|
||||
"~=" @operator
|
||||
"==" @operator
|
||||
"<=" @operator
|
||||
">=" @operator
|
||||
"not" @operator
|
||||
"and" @operator
|
||||
"or" @operator
|
||||
"<" @operator
|
||||
">" @operator
|
||||
|
||||
"+" @operator
|
||||
"-" @operator
|
||||
"%" @operator
|
||||
"/" @operator
|
||||
"//" @operator
|
||||
"*" @operator
|
||||
"^" @operator
|
||||
"&" @operator
|
||||
"~" @operator
|
||||
"|" @operator
|
||||
">>" @operator
|
||||
"<<" @operator
|
||||
".." @operator
|
||||
"#" @operator
|
||||
|
||||
;; Constants
|
||||
(false) @constant
|
||||
(true) @constant
|
||||
(nil) @constant
|
||||
(spread) @constant ;; "..."
|
||||
|
||||
;; Nodes
|
||||
(function "function" @function "end" @function)
|
||||
(table "{" @operator "}" @operator)
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(number) @constant
|
||||
(number) @number
|
||||
(label_statement) @label
|
||||
|
||||
;; Error
|
||||
(ERROR) @Error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue