diff options
| author | Pete Matsyburka <pete.matsy@gmail.com> | 2024-07-07 18:24:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-08 00:24:57 +0900 |
| commit | ad43c7f19ec44da807264cee88f3f929db1233d5 (patch) | |
| tree | 814bbb3b68910ac25d3415c47f3308b2c6ca7f0a | |
| parent | feat(jsx): apply HTML-based highlight improvements (#6867) (diff) | |
| download | nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar.gz nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar.bz2 nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar.lz nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar.xz nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.tar.zst nvim-treesitter-ad43c7f19ec44da807264cee88f3f929db1233d5.zip | |
feat(ruby): highlights for special methods (#6735)
| -rw-r--r-- | queries/ruby/highlights.scm | 11 |
1 files changed, 8 insertions, 3 deletions
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_]+$")) |
