vscode-todo-highlight icon indicating copy to clipboard operation
vscode-todo-highlight copied to clipboard

ENHANCEMENT - Option to toggle off certain highlighting in comments?

Open GBR6000 opened this issue 1 year ago • 2 comments

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.

GBR6000 avatar Jul 25 '23 18:07 GBR6000

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 avatar Jul 28 '23 14:07 jgclark

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."

GBR6000 avatar Jul 31 '23 11:07 GBR6000