vunguyentuan / vscode-css-variables

CSS variables autocomplete for vscode
https://marketplace.visualstudio.com/items?itemName=vunguyentuan.vscode-css-variables
MIT License
135 stars 20 forks source link

[Feature request] New setting to define when to trigger the extension #20

Open amaury-hanser opened 2 years ago

amaury-hanser commented 2 years ago

When using with emmet, this extension will take precedence over the emmet's suggestion.

If I type br for background-repeat (emmet suggestion), it will first list all css custom properties, meaning that if I press tab, I won't get background-repeat but the first css custom property with the letters b and r (e.g. var(--breakpoint-2xl)).

It would be super nice to be able to define in the settings what will trigger the auto-complete.
You could define a string, let's say -- that would trigger the auto-complete and there would be no more conflict with emmet.

What do you think?

paulrudy commented 2 years ago

+1 for this suggestion. I'm frequently getting autocompletes for css variables in unintended locations

hzb1 commented 1 year ago

+1

SukkaW commented 8 months ago

I am also facing the same issue. I am getting autocompletes for css variables even when typing in CSS property:

image

Update

I was using the PostCSS VSCode extension and it seems to have a compatibility issue with this. Disabling the PostCSS extension and back to the VSCode built-in CSS and the plugin works just fine.