From 3c8842c79a2b499453c7f40d4babf5067a07e452 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 24 Feb 2023 06:38:02 -0500 Subject: [PATCH] refactor(ruby): move keywords appropriately --- queries/ruby/highlights.scm | 27 +++++++++++++++++++++------ 1 file 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 [ @@ -35,6 +29,14 @@ "not" ] @keyword.operator +[ + "def" + "undef" +] @keyword.function + +(method + "end" @keyword.function) + [ "case" "else" @@ -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