nvim-treesitter/queries/lua/highlights.scm
Thomas Vigouroux 85d2f9ee93 highlights: some fixes
Add `goto` keyword for C.
Fix typo for lua.
2020-07-16 10:49:49 +02:00

81 lines
739 B
Scheme

;;; Highlighting for lua
;;; Builtins
;; Keywords
(
"if" @conditional
"end" @conditional
)
[
"else"
"elseif"
"then"
] @conditional
(
[
"do"
"while"
"repeat"
"for"
] @repeat
"end" @repeat
)
[
"in"
"local"
"return"
(break_statement)
"goto"
] @keyword
;; Operators
[
"~="
"=="
"<="
">="
"not"
"and"
"or"
"<"
">"
"+"
"-"
"%"
"/"
"//"
"*"
"^"
"&"
"~"
"|"
">>"
"<<"
".."
"#"
] @operator
;; Constants
[
(false)
(true)
] @boolean
(nil) @constant.builtin
(spread) @constant ;; "..."
;; Nodes
("function" @function "end" @function) ;; Any node that has both funtion and end in it
(table ["{" "}"] @constructor)
(comment) @comment
(string) @string
(number) @number
(label_statement) @label
;; Error
(ERROR) @Error