mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
62 lines
1 KiB
Scheme
62 lines
1 KiB
Scheme
;;; Highlighting for lua
|
|
|
|
;;; Builtins
|
|
;; Keywords
|
|
"local" @keyword
|
|
"if" @conditional
|
|
"then" @conditional
|
|
"else" @conditional
|
|
"elseif" @conditional
|
|
"end" @keyword
|
|
"return" @keyword
|
|
"do" @repeat
|
|
"while" @repeat
|
|
"repeat" @repeat
|
|
"for" @repeat
|
|
(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) @boolean
|
|
(true) @boolean
|
|
(nil) @constant.builtin
|
|
(spread) @constant ;; "..."
|
|
|
|
;; Nodes
|
|
(function "function" @function "end" @function)
|
|
(function_definition "function" @function "end" @function)
|
|
(local_function "function" @function "end" @function)
|
|
(table "{" @constructor "}" @constructor)
|
|
(comment) @comment
|
|
(string) @string
|
|
(number) @number
|
|
(label_statement) @label
|
|
|
|
;; Error
|
|
(ERROR) @Error
|