razor icon indicating copy to clipboard operation
razor copied to clipboard

Colourization issues on VS Mac

Open davidwengier opened this issue 3 years ago • 2 comments

Version: 17.4.0.1343-pre.2-arm64

Dark theme, note the @ and { of the code block are black-on-black: Screen Shot 2022-08-22 at 2 04 32 pm

Light theme is fine: Screen Shot 2022-08-22 at 2 05 10 pm

Maybe related, Christian found that (what looks to be) textmate classification isn't working, but semantic maybe is?: image

Not sure if this is us or VS Mac. Someone who knows classification better than me can probably explain :)

davidwengier avatar Aug 22 '22 04:08 davidwengier

It definitely looks like TextMate isn't working, but I've debugged through and confirmed that our TextMate paths in our AddIn are getting found and loaded. Also, regarding the @code colourization, it looks right on first opening of the file, but then changes. It seems like semantic classification is working, and the theme is being applied, but then something is overriding it. Perhaps the (what I presume are classifications for the legacy editor) are being found and used?

Seems like maybe this is an editor issue @gundermanc? Or if not I would appreciate any tips you might have for where to investigate next. I admit my debugging skills on Mac are lacking :)

davidwengier avatar Oct 07 '22 04:10 davidwengier

Ok I found at least one Editor issue: we're missing this change in the Mac renderer https://devdiv.visualstudio.com/DevDiv/_git/VS-Platform/pullrequest/430086

TextMate libraries on Mac + Windows are now almost identical so if there's a difference this would likely point to a configuration or theme difference.

gundermanc avatar Oct 18 '22 00:10 gundermanc

Looks like Roslyn/Razor/VSMac cannot update a documents DocumentServiceProvider, which needs to happen for semantic colorization to be correct for Razor files (and has other affects too, like diagnostics etc.).

This will need a new EA API from Roslyn, which we respond to, then some more testing to see if there are other issues.

davidwengier avatar Oct 21 '22 04:10 davidwengier