ironsheep / P2-vscode-langserv-extension

Spin/Spin2 Language Server based vscode extension
MIT License
1 stars 0 forks source link

Disabled #ifdef section is orange #5

Open Wuerfel21 opened 4 months ago

Wuerfel21 commented 4 months ago

and have you...

Version of Spin2 Language Server VScode Extension with the issue

the new one

Is this a regression?

Yes. This used to work, but now it doesn't.

Hardware, Operating System, Operating System version, VSCode version

[insert the funny here]

Description of problem

An attempt seems to have been made at greying out the disabled #ifdef sections. Unfortunately, it gives everythng the orange color normally used for strings: image

This working correctly in the C++ extension: image

Additional information

No response

Wuerfel21 commented 4 months ago

(there don't appear to be any special scopes created by the C++ extension, so it must be doing something else to lower the opacity)

ironsheep commented 4 months ago

wow... my apologies! ;-)

Ok, a couple of things. My bad for not thinking about other themes and how they'd interpret things.

Please help me with two things:

  1. Tell me exactly which C++ extension you are using, and I'll go wander the source code to see how they are doing it.
  2. tell me exactly which theme you are using so I can see how I'm triggering the orange.

At this point, I don't know if I can runtime affect colors so in my own themes I was planning on a 2nd dimmer full-color palette which would be selected by the attribute that I'm currently using to select the single grey color (well in my themes it's grey ;-)

Maybe the C++ code investigation will show that there is another possible way to do this.

Wuerfel21 commented 4 months ago

They do it like this, apparently: https://github.com/microsoft/vscode-cpptools/blob/92a049479608f02f284e6c2c7e37be196dccd1ab/Extension/src/LanguageServer/client.ts#L2630

Wuerfel21 commented 4 months ago

Also, something I notice is that sometimes large sections of the file turn orange for no apparent reason. It seems to never clear which lines should be disabled when editing the file. But sometimes it also happens without having made large edits

ironsheep commented 4 months ago

Sigh.... good to know...

I found problems with how they were doing the coloring... I'm still investigating if it's possible to use their technique.