Dylan Beattie
Dylan Beattie

Reputation: 54140

How can I find out exactly which rule is applying syntax highlighting to a particular code element in VS2022 with Resharper?

I'm running Visual Studio 2022 with Resharper (EAP) and the "Cyberpunk" theme from the VS marketplace (https://marketplace.visualstudio.com/items?itemName=T0uchM3.CTVS19)

Something is applying a white background to the syntax highlighting, but only on strings in JavaScript code which contain jQuery/CSS selectors - see this example:

a screenshot of JavaScript code in Visual Studio 2022 showing some problems with syntax highlighting

Regular strings (e.g. the "click" in event handler declarations) are fine. I've been through the VS color list looking for anything with a white background but haven't found out where this is coming from.

Any way to highlight a code snippet and see what rules/plugins are applying syntax highlighting to that specific code snippet?

Upvotes: 0

Views: 493

Answers (1)

Dylan Beattie
Dylan Beattie

Reputation: 54140

The specific setting here is Resharper Injected Language Background in Visual Studio Options > Environment > Fonts and Colors:enter image description here

(Thank you @buhakmeh for figuring this one out!)

Upvotes: 1

Related Questions