feat(ruby): highlights for special methods (#6735)

This commit is contained in:
Pete Matsyburka 2024-07-07 18:24:57 +03:00 committed by GitHub
parent a8c082b4f5
commit ad43c7f19e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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_]+$"))