ruby-ts-mode: Standardize the string literal highlights

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use font-lock-string-face for %w() and `...`.
Use font-lock-constant-face (just like we do for symbol literals)
for symbol array literals, %i().
Combine the matchers for string content and heredocs.
This commit is contained in:
Dmitry Gutov 2023-01-02 23:26:39 +02:00
parent 1a9a1fdebf
commit 9e6536e4d9

View file

@ -253,16 +253,17 @@ values of OVERRIDE"
:feature 'string :feature 'string
'((delimited_symbol [ ":\"" "\"" ] @font-lock-string-face) '((delimited_symbol [ ":\"" "\"" ] @font-lock-string-face)
(string "\"" @font-lock-string-face) (string "\"" @font-lock-string-face)
(string_array [ "%w(" ")" ] @font-lock-delimiter-face) (string_array ["%w(" ")"] @font-lock-string-face)
(subshell "`" @font-lock-delimiter-face) (subshell "`" @font-lock-string-face)
(symbol_array [ "%i(" ")"] @font-lock-delimiter-face)) (symbol_array ["%i(" ")"] @font-lock-constant-face))
:language language :language language
:feature 'string :feature 'string
'((string_content) @font-lock-string-face '([(string_content)
(heredoc_beginning) @font-lock-string-face (heredoc_beginning)
(heredoc_content) @font-lock-string-face (heredoc_content)
(heredoc_end) @font-lock-string-face) (heredoc_end)]
@font-lock-string-face)
:language language :language language
:feature 'interpolation :feature 'interpolation