diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-07-05 19:58:47 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-08 22:16:53 +0200 |
| commit | f9844d359e45578fee10302804cdf22570967d84 (patch) | |
| tree | 2911feb2aeb6a736b1e7c4317a083c9a8a381287 /queries/lua | |
| parent | Introduce @definition.import for Python/Javascript (diff) | |
| download | nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar.gz nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar.bz2 nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar.lz nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar.xz nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.tar.zst nvim-treesitter-f9844d359e45578fee10302804cdf22570967d84.zip | |
highlight(lua): fix overlapping queries
Diffstat (limited to 'queries/lua')
| -rw-r--r-- | queries/lua/highlights.scm | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 28247491d..1ad10480e 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -2,25 +2,31 @@ ;;; Builtins ;; Keywords +( + [ + "if" + "then" + "else" + "elseif" + ] @conditional + "end" @confitional +) -[ -"if" -"then" -"else" -"elseif" - ] @conditional -[ -"do" -"while" -"repeat" -"for" -"in" -] @repeat +( + [ + "do" + "while" + "repeat" + "for" + ] @repeat + + "end" @repeat +) [ +"in" "local" -"end" "return" (break_statement) "goto" @@ -63,7 +69,7 @@ (spread) @constant ;; "..." ;; Nodes -(_ "function" @function "end" @function) ;; Any node that has both funtion and end in it +("function" @function "end" @function) ;; Any node that has both funtion and end in it (table ["{" "}"] @constructor) (comment) @comment |
