mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
feat(ruby): highlights for special methods (#6735)
This commit is contained in:
parent
a8c082b4f5
commit
ad43c7f19e
1 changed files with 8 additions and 3 deletions
|
|
@ -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_]+$"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue