diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-02-24 06:38:02 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-03-03 07:07:52 -0800 |
| commit | 3c8842c79a2b499453c7f40d4babf5067a07e452 (patch) | |
| tree | 57f217d7be0e20f6e22d284ec0c44d994c5f0fd0 /queries/ruby/highlights.scm | |
| parent | feat!: add `@keyword.coroutine` capture (diff) | |
| download | nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar.gz nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar.bz2 nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar.lz nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar.xz nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.tar.zst nvim-treesitter-3c8842c79a2b499453c7f40d4babf5067a07e452.zip | |
refactor(ruby): move keywords appropriately
Diffstat (limited to 'queries/ruby/highlights.scm')
| -rw-r--r-- | queries/ruby/highlights.scm | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index cf253a474..c350e5ad1 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -8,19 +8,13 @@ [ "alias" "begin" - "break" "class" - "def" "do" "end" "ensure" "module" - "next" - "redo" "rescue" - "retry" "then" - "undef" ] @keyword [ @@ -36,6 +30,14 @@ ] @keyword.operator [ + "def" + "undef" +] @keyword.function + +(method + "end" @keyword.function) + +[ "case" "else" "elsif" @@ -44,10 +46,23 @@ "when" ] @conditional +(if + "end" @conditional) +(if + (then) @conditional) +(unless + (then) @conditional) +(elsif + (then) @conditional) + [ "for" "until" "while" + "break" + "redo" + "retry" + "next" ] @repeat (constant) @type |
