From e8d74461da831f9b4eb31d2d652bfd0c99a2bd7b Mon Sep 17 00:00:00 2001 From: Tyler Miller Date: Thu, 18 Jul 2024 02:24:20 -0700 Subject: fix(gitignore): hl/capture non-special pattern chars Capture regular, non-special characters (as `@string.special.path`) allowing them to be highlighted. --- queries/gitignore/highlights.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'queries/gitignore') diff --git a/queries/gitignore/highlights.scm b/queries/gitignore/highlights.scm index 10ae3f309..aafbe541e 100644 --- a/queries/gitignore/highlights.scm +++ b/queries/gitignore/highlights.scm @@ -1,5 +1,7 @@ (comment) @comment @spell +(pattern_char) @string.special.path + [ (directory_separator) (directory_separator_escaped) @@ -9,16 +11,17 @@ (wildcard_char_single) (wildcard_chars) (wildcard_chars_allow_slash) - (bracket_negation) -] @operator - -(negation) @punctuation.special +] @character.special [ (pattern_char_escaped) (bracket_char_escaped) ] @string.escape +(negation) @punctuation.special + +(bracket_negation) @operator + ; bracket expressions [ "[" -- cgit v1.2.3-70-g09d2