withastro / language-tools

Language tools for Astro
MIT License
267 stars 52 forks source link

🐛 BUG: class and object constructors lose their color on VS Code Astro extension #788

Closed Firgrep closed 7 months ago

Firgrep commented 7 months ago

Describe the Bug

The astro extension on VS code appears to switch off the green coloring for class objects. Object and NextResponse should be green, but instead they're light-blue like normal variables. (I'm using color theme dark modern, but it appears to also affect other themes).

Screenshot 2024-02-12 133304 Screenshot 2024-02-12 133311

Steps to Reproduce

  1. Have Astro extension installed on VS Code.
  2. Open up or make a typescript file and make a class constructed object, e.g. Object.keys(someObject) and see that Object is not appearing as normally green in VS Code's color config.
  3. Go to extensions and disable Astro.
  4. Watch the color of Object revert to green as expected.
Princesseuh commented 7 months ago

Great catch! It seems like this works inside Astro files directly, so it must be something related to our TypeScript plugin. Nowadays our TypeScript plugin essentially does nothing by itself, and everything happens in Volar itself. As such, this is most likely an issue upstream that might be affecting other frameworks using Volar.