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

ENHANCEMENT - Option to toggle off certain highlighting in comments? #85

Open
GBR6000 opened this issue Jul 25, 2023 · 2 comments
Open
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@GBR6000
Copy link

GBR6000 commented Jul 25, 2023

I'm using the extension to highlight citation commands in latex. But these commands don't need to be highlighted if inside a comment. This is doable using regex but it would be nice if there was a option for it.

@jgclark
Copy link
Owner

jgclark commented Jul 28, 2023

I think you're suggesting being able to set this per highlight, right?
Either way, it's challenging, as it would then need to know the syntax for all single- and multi-line comments in different file types.
Giving some regex examples for different languages feels like a much easier option.
Or am I missing something?

@jgclark jgclark added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 28, 2023
@GBR6000
Copy link
Author

GBR6000 commented Jul 31, 2023

Yes I was thinking per highlight.
To be honest I don't really know about the back end of the extension but generally the textmate scope for a comment starts with "comment.line." or "comment.block.". But if this isn't accessible then I imagine it would be far more difficult that it is worth to implement.

Edit: Python block comments start with "string.quoted.docstring."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants