From 7499f7379459db3b31c75cf5cec45f785be6e2c7 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sun, 25 Aug 2024 15:12:57 -0700 Subject: feat(ruby): string/punctuation highlight improvements --- queries/ruby/highlights.scm | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'queries/ruby') diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm index 6ea2eab02..c3b9c6cb1 100644 --- a/queries/ruby/highlights.scm +++ b/queries/ruby/highlights.scm @@ -172,10 +172,10 @@ ; (#is-not? local)) ; Literals [ - (string) - (bare_string) - (subshell) - (heredoc_body) + (string_content) + (heredoc_content) + "\"" + "`" ] @string [ @@ -190,11 +190,8 @@ (hash_key_symbol) ] @string.special.symbol -(pair - key: (hash_key_symbol) - ":" @constant) - -(regex) @string.regexp +(regex + (string_content) @string.regexp) (escape_sequence) @string.escape @@ -276,8 +273,15 @@ ";" "." "&." + "::" ] @punctuation.delimiter +(regex + "/" @punctuation.bracket) + +(pair + ":" @punctuation.delimiter) + [ "(" ")" @@ -289,6 +293,9 @@ "%i(" ] @punctuation.bracket +(block_parameters + "|" @punctuation.bracket) + (interpolation "#{" @punctuation.special - "}" @punctuation.special) @none + "}" @punctuation.special) -- cgit v1.2.3-70-g09d2