Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO sample works perfectly but I am trying to highlight other text and can't get it? #138

Open
JimNayzium opened this issue Apr 17, 2024 · 2 comments

Comments

@JimNayzium
Copy link

JimNayzium commented Apr 17, 2024

Here is what I have put in, as well as dozens of other versions of the same thing.
I am trying to select in my code any time there is a ! logic operand, like
if (!$phpVar) {
would grab the (! all the way through the ) is what I want.

I guess my 52 year old eyes just never see the opening ! in those little statements and I am trying to mark them better with some bold etc...

Any ideas why all your samples you provided work perfectly, and I can even alter the text and restart vscode and make it work for other text like TODO_TEST type thing.

But cannot figure out how to make it grab the (! ... )
THANKS!

Also, a regex in vscode search box for (!.*?) does indeed find all my occurences and selects the range I am hoping to highlight. So I thought double escaping would do the trick... but it does not.

"highlight.regexes": { "\\(!.*?\\)": { "filterFileRegex": ".*(?<!CHANGELOG.md)$", "decorations": [ { "overviewRulerColor": "#ffcc00", "backgroundColor": "#ffcc00", "color": "#1f1f1f", "fontWeight": "bold" }, { "backgroundColor": "#ffcc00", "color": "#1f1f1f" } ] },

@sapegin
Copy link

sapegin commented May 10, 2024

Doesn't exactly answer your question, but I have a similar issue with often missing ! so I created a theme that renders operators (including the !) in bold:

image

@abs-lme
Copy link

abs-lme commented Dec 21, 2024

Same for me. The setting highlight.regexes does not seem to work at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants