]> git.eshelyaron.com Git - emacs.git/commitdiff
ruby-ts-mode: Highlight singleton method definitions and setters
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 2 Jan 2023 01:29:15 +0000 (03:29 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 2 Jan 2023 01:29:15 +0000 (03:29 +0200)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Highlight singleton method definitions and setters.

lisp/progmodes/ruby-ts-mode.el

index 2654f08fe8545de3a27361e5e6b84c6e4ac8e14f..ac016caccdcea0229e94f3b45757c96b2cb8df02 100644 (file)
@@ -284,7 +284,11 @@ values of OVERRIDE"
    :language language
    :feature 'method-definition
    '((method
-      name: (identifier) @font-lock-function-name-face))
+      name: (identifier) @font-lock-function-name-face)
+     (singleton_method
+      name: (identifier) @font-lock-function-name-face)
+     (method
+      name: (setter) @font-lock-function-name-face))
 
    ;; Yuan recommends also putting method definitions into the
    ;; 'function' category (thus keeping it in both).  I've opted to