How do you escape characters in a lua-match query? #4939
Unanswered
ColinKennedy
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: I used
:TSInstall comment
to add comment highlighting and parsing.I'd like comments in Python, for example, to light up if they end in a
!
, like this. And I'd like certain others lines to highlight differently if they end in?
(for example)I tried adding my own queries to do this, such as
I've tried other varieties such as \!, [!], and anything else that I could think of to try to escape the
!
and?
characters, nothing worked. I read through:help treesitter-predicate-lua-match?
and the other areas but didn't see anything on this topic. Any advice on how to escape!
and?
to get the desired effect would be appreciated.Beta Was this translation helpful? Give feedback.
All reactions