aboutsummaryrefslogtreecommitdiffstats
path: root/queries/lua/highlights.scm
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-05-07 09:23:33 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2020-05-07 14:03:29 +0200
commit22f73628f618465913d93e907a0a3881ed221b1d (patch)
treeae85ef0ad8e6a45ecfa7285aec3a430f3711d921 /queries/lua/highlights.scm
parentfix: change locals extraction (diff)
downloadnvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar.gz
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar.bz2
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar.lz
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar.xz
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.tar.zst
nvim-treesitter-22f73628f618465913d93e907a0a3881ed221b1d.zip
fix(lua): update queries
Diffstat (limited to 'queries/lua/highlights.scm')
-rw-r--r--queries/lua/highlights.scm25
1 files changed, 13 insertions, 12 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm
index 3077be108..a674638e8 100644
--- a/queries/lua/highlights.scm
+++ b/queries/lua/highlights.scm
@@ -3,16 +3,16 @@
;;; Builtins
;; Keywords
"local" @keyword
-"if" @keyword
-"then" @keyword
-"else" @keyword
-"elseif" @keyword
+"if" @conditional
+"then" @conditional
+"else" @conditional
+"elseif" @conditional
"end" @keyword
"return" @keyword
-"do" @keyword
-"while" @keyword
-"repeat" @keyword
-"for" @keyword
+"do" @repeat
+"while" @repeat
+"repeat" @repeat
+"for" @repeat
(break_statement) @keyword
"goto" @keyword
@@ -43,15 +43,16 @@
"#" @operator
;; Constants
-(false) @constant
-(true) @constant
-(nil) @constant
+(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 "{" @operator "}" @operator)
+(table "{" @constructor "}" @constructor)
(comment) @comment
(string) @string
(number) @number