From aa50c97bb16b06bad6df2dcfda8bac04467dd7bf Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 5 Dec 2025 10:58:26 +0100 Subject: [PATCH] Fix highlighting for string-literal symbols. --- runtime/queries/ruby/highlights.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/queries/ruby/highlights.scm b/runtime/queries/ruby/highlights.scm index a1a2c250d..f9991af51 100644 --- a/runtime/queries/ruby/highlights.scm +++ b/runtime/queries/ruby/highlights.scm @@ -190,6 +190,13 @@ (hash_key_symbol) ] @string.special.symbol +(delimited_symbol + (string_content) @string.special.symbol) + +; Ensure "symbol" highlight has priority over "string" highlight for closing quote character. +((delimited_symbol) @string.special.symbol + (#set! priority 101)) + (regex (string_content) @string.regexp)