diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2020-09-05 09:53:21 -0500 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-06 17:24:34 +0200 |
| commit | 5504b84d215e1f6a77ca27e68200840e2a3645f8 (patch) | |
| tree | a12a7220f4e467a4d5a098edbf1ef97e52e9ca9c /queries/lua | |
| parent | feat(folds): add ts and js folds (diff) | |
| download | nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar.gz nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar.bz2 nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar.lz nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar.xz nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.tar.zst nvim-treesitter-5504b84d215e1f6a77ca27e68200840e2a3645f8.zip | |
Lua: fix loop and conditional keywords highlights
Diffstat (limited to 'queries/lua')
| -rw-r--r-- | queries/lua/highlights.scm | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 0ea6f6355..9f7661a45 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -2,27 +2,45 @@ ;;; Builtins ;; Keywords -( - "if" @conditional - "end" @conditional -) + +(if_statement +[ + "if" + "then" + "end" +] @conditional) + [ "else" "elseif" - "then" -] @conditional +] @contional +(for_statement +[ + "for" + "do" + "end" +] @repeat) -( - [ +(for_in_statement +[ + "for" "do" + "end" +] @repeat) + +(while_statement +[ "while" - "repeat" - "for" - ] @repeat + "do" + "end" +] @repeat) - "end" @repeat -) +(repeat_statement +[ + "repeat" + "until" +] @repeat) [ "in" |
