aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ruby
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-08-25 15:12:57 -0700
committerChristian Clason <c.clason@uni-graz.at>2024-08-26 09:39:01 +0200
commit7499f7379459db3b31c75cf5cec45f785be6e2c7 (patch)
tree1e59f63853320b2980dc0847754dcd61ada5a9bf /queries/ruby
parentfeat(make): highlight more special characters (diff)
downloadnvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar.gz
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar.bz2
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar.lz
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar.xz
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.tar.zst
nvim-treesitter-7499f7379459db3b31c75cf5cec45f785be6e2c7.zip
feat(ruby): string/punctuation highlight improvements
Diffstat (limited to 'queries/ruby')
-rw-r--r--queries/ruby/highlights.scm27
1 files changed, 17 insertions, 10 deletions
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)