mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
feat: syntax highlighting
This commit is contained in:
parent
8bb53c93d0
commit
d05728e155
4 changed files with 57 additions and 1 deletions
36
queries/lua/highlights.scm
Normal file
36
queries/lua/highlights.scm
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue