microsoft / vscode-css-languageservice

CSS, LESS & SCSS language service extracted from VSCode to be reused, e.g in the Monaco editor.
MIT License
312 stars 176 forks source link

Allows to disable CSS variables suggestions #398

Open MangelMaxime opened 1 month ago

MangelMaxime commented 1 month ago

Hello,

Currently, this extensions only supports CSS variables suggestions from the current file #156

There are others extensions, that specialise in providing CSS variables suggestions like:

The problems is that the suggestions from the different extensions are merged with the one from vscode-css-languageservice:

CleanShot 2024-06-30 at 15 52 35

This leads to duplicate suggestions and also makes the navigation more difficult. For example, if I try to go to the definition of a variable, I don't go there directly I have a "preview popup" opening asking me to choose which one I want.

https://github.com/microsoft/vscode-css-languageservice/assets/4760796/cdf00dc1-8def-49e4-b6e8-278e4b307024

It would be nice if vscode-css-languageservice had a setting to disable their CSS variables suggestions so others extensions can take over.

I think this is important to allows the users to use other extensions for CSS variables completion because there are a lot of different situation to supports:

This is not possible / right, to expect from vscode-css-languageservice to supports all these scenarios but I think it is important to not "degrade" the experience of the other extensions who specialise in CSS variables completions.

Related issues: https://github.com/willofindie/vscode-cssvar/issues/66 https://github.com/willofindie/vscode-cssvar/issues/83