emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 ee3e8d3f92: (ruby-ts--font-lock-settings): Improve highlighting


From: Dmitry Gutov
Subject: emacs-29 ee3e8d3f92: (ruby-ts--font-lock-settings): Improve highlighting in patterns
Date: Sat, 7 Jan 2023 21:00:04 -0500 (EST)

branch: emacs-29
commit ee3e8d3f927eba45b6863d4b2448376aacb02501
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    (ruby-ts--font-lock-settings): Improve highlighting in patterns
    
    * lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
    Improve highlighting in patterns: highlight values not keys as
    variable in the usual case; highlight keys when no value;
    highlight the "as pattern" variable.
---
 lisp/progmodes/ruby-ts-mode.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 5f5de50043..9ec771e2ff 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -304,7 +304,12 @@ values of OVERRIDE"
      (array_pattern
       (identifier) @font-lock-variable-name-face)
      (keyword_pattern
-      key: (hash_key_symbol) @font-lock-variable-name-face)
+      value: (identifier) @font-lock-variable-name-face)
+     (keyword_pattern
+      key: (hash_key_symbol) @font-lock-variable-name-face
+      !value)
+     (as_pattern
+      name: (identifier) @font-lock-variable-name-face)
      (in_clause
       pattern: (identifier) @font-lock-variable-name-face))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]