feat: syntax highlighting

This commit is contained in:
Thomas Vigouroux 2020-04-20 16:18:02 +02:00
parent 8bb53c93d0
commit d05728e155
4 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,36 @@
;;; Highlighting for lua
;;; Builtins
;; Keywords
"local" @keyword
"if" @keyword
"then" @keyword
"else" @keyword
"elseif" @keyword
"end" @keyword
"return" @keyword
"do" @keyword
"while" @keyword
"repeat" @keyword
"for" @keyword
;; Operators
"~=" @operator
"==" @operator
"not" @operator
"and" @operator
"or" @operator
;; Constants
(false) @constant
(true) @constant
(nil) @constant
;; Nodes
(function "function" @function "end" @function)
(comment) @comment
(string) @string
(number) @constant
;; Error
(ERROR) @Error