diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-06-30 08:59:34 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-01 14:46:55 +0200 |
| commit | d15210b22fa926ac8d21f8ad95269cad89492d3d (patch) | |
| tree | 539e4dfd8cc656f53589876ce32a293c7d466489 | |
| parent | remove doc/tags (diff) | |
| download | nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar.gz nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar.bz2 nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar.lz nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar.xz nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.tar.zst nvim-treesitter-d15210b22fa926ac8d21f8ad95269cad89492d3d.zip | |
highlights(lua): update query to new syntax
| -rw-r--r-- | queries/lua/highlights.scm | 97 |
1 files changed, 55 insertions, 42 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index a674638e8..28247491d 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -2,57 +2,70 @@ ;;; 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 + +[ +"if" +"then" +"else" +"elseif" + ] @conditional + +[ +"do" +"while" +"repeat" +"for" +"in" +] @repeat + +[ +"local" +"end" +"return" +(break_statement) +"goto" +] @keyword ;; Operators -"~=" @operator -"==" @operator -"<=" @operator -">=" @operator -"not" @operator -"and" @operator -"or" @operator -"<" @operator -">" @operator +[ +"~=" +"==" +"<=" +">=" +"not" +"and" +"or" +"<" +">" +"+" +"-" +"%" +"/" +"//" +"*" +"^" +"&" +"~" +"|" +">>" +"<<" +".." +"#" + ] @operator -"+" @operator -"-" @operator -"%" @operator -"/" @operator -"//" @operator -"*" @operator -"^" @operator -"&" @operator -"~" @operator -"|" @operator -">>" @operator -"<<" @operator -".." @operator -"#" @operator ;; Constants -(false) @boolean -(true) @boolean +[ +(false) +(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) +(_ "function" @function "end" @function) ;; Any node that has both funtion and end in it + +(table ["{" "}"] @constructor) (comment) @comment (string) @string (number) @number |
