nvim-treesitter/queries/lua/highlights.scm

63 lines
1 KiB
Scheme
Raw Normal View History

2020-04-20 16:18:02 +02:00
;;; Highlighting for lua
;;; Builtins
;; Keywords
"local" @keyword
2020-05-07 09:23:33 +02:00
"if" @conditional
"then" @conditional
"else" @conditional
"elseif" @conditional
2020-04-20 16:18:02 +02:00
"end" @keyword
"return" @keyword
2020-05-07 09:23:33 +02:00
"do" @repeat
"while" @repeat
"repeat" @repeat
"for" @repeat
2020-04-20 19:13:24 +02:00
(break_statement) @keyword
"goto" @keyword
2020-04-20 16:18:02 +02:00
;; Operators
"~=" @operator
"==" @operator
2020-04-20 19:13:24 +02:00
"<=" @operator
">=" @operator
2020-04-20 16:18:02 +02:00
"not" @operator
"and" @operator
"or" @operator
2020-04-20 19:13:24 +02:00
"<" @operator
">" @operator
"+" @operator
"-" @operator
"%" @operator
"/" @operator
"//" @operator
"*" @operator
"^" @operator
"&" @operator
"~" @operator
"|" @operator
">>" @operator
"<<" @operator
".." @operator
"#" @operator
2020-04-20 16:18:02 +02:00
;; Constants
2020-05-07 09:23:33 +02:00
(false) @boolean
(true) @boolean
(nil) @constant.builtin
2020-04-20 19:13:24 +02:00
(spread) @constant ;; "..."
2020-04-20 16:18:02 +02:00
;; Nodes
(function "function" @function "end" @function)
2020-05-07 09:23:33 +02:00
(function_definition "function" @function "end" @function)
(local_function "function" @function "end" @function)
2020-05-07 09:23:33 +02:00
(table "{" @constructor "}" @constructor)
2020-04-20 16:18:02 +02:00
(comment) @comment
(string) @string
2020-04-20 19:13:24 +02:00
(number) @number
(label_statement) @label
2020-04-20 16:18:02 +02:00
;; Error
(ERROR) @Error