willofindie / vscode-cssvar

VSCode extension to support CSS Variables Intellisense
https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
MIT License
243 stars 4 forks source link

[Bug] it's remembering variables from all times, from other files #80

Open lucianahanan opened 1 year ago

lucianahanan commented 1 year ago

image

image

I tend to use the same variable names on many CSS files. It happens that when I type --, your extension shows a huge list of variables with the same name, and different colors, one for each time I used that variable in a CSS file, with like 50s --text, 50s --heading, 50s --primary.....

The worse is that it's getting hard to find the current variable on the current CSS file, that is the one I'm supposed to call. But there are so many with different colors!

I'm not sure if there is an option to forget other files ever used variables, but well, it's hard to work like the way it is now!

Please help!

phoenisx commented 1 year ago

I am not sure how are you using this extension, because having 50 duplicates for a CSS variable is very less likely in a project.

Have you tried setting up a Multi Root Workspace, an example for the same is present in this repo as well, do check it out, might be helpful for you?

Anyways, I have plans to reduce the number of duplicates in a future release, will take up this task then 👍🏽

lucianahanan commented 1 year ago

To reproduce the issue, just make a few css files using the same variable, with different colors. Then you will see it. If you create 3 times, there will be 3 variables with the same name, one for each color, in the dropdown list.