From ad43c7f19ec44da807264cee88f3f929db1233d5 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 7 Jul 2024 18:24:57 +0300 Subject: feat(ruby): highlights for special methods (#6735) --- queries/ruby/highlights.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'queries/ruby') diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index 83cffffd4..738f9c9f8 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -71,9 +71,6 @@ "ensure" ] @keyword.exception -((identifier) @keyword.exception - (#any-of? @keyword.exception "fail" "raise")) - ; Function calls "defined?" @function @@ -127,6 +124,14 @@ (#any-of? @constant.builtin "__callee__" "__dir__" "__id__" "__method__" "__send__" "__ENCODING__" "__FILE__" "__LINE__")) +((identifier) @function.builtin + (#any-of? @function.builtin + "include" "extend" "prepend" "attr_reader" "attr_writer" "attr_accessor" "module_function" + "refine" "using")) + +((identifier) @keyword.exception + (#any-of? @keyword.exception "raise" "fail" "catch" "throw")) + ((constant) @type (#not-lua-match? @type "^[A-Z0-9_]+$")) -- cgit v1.3