gencer / SCSS-Everywhere

A Visual Studio Code extension that provides CSS class and ID atttribute completion with incremental build and usage explorer for the HTML class attribute based on the CSS/Template files in your workspace. Also supports React's className attribute.
https://marketplace.visualstudio.com/items?itemName=gencer.html-slim-scss-css-class-completion
MIT License
24 stars 9 forks source link

Change activationEvents to stop eager/unnecessary load #73

Open willstocks opened 3 years ago

willstocks commented 3 years ago

Adjustment to the activationEvents from * to specifically looking for scss or sass

gencer commented 3 years ago

Hey @willstocks!

Thanks for the PR.

Sounds great. But I think we should extend this more. See, SCSS Everywhere is different than other extension which is not only autocompletes and do caches on SCSS/CSS but also on *.slim,*.ts,*.js,*.erb..... I am wondering how will this affect those files. Because, If I get it right, user first needs to open a CSS/SCSS File first to get this extension work.

willstocks commented 3 years ago

Hey @gencer No worries! 😄 I included "workspaceContains:**/*.s[ac]ss", so that it activates as long as the workspace contains one of these file types (I'll adjust to include vanilla .css as well), but it will also activate on just .scss or .sass files being opened (again, I can adjust this to look for vanilla .css as well if you'd like?). That being said, you make a very good point and I will get the file-types updated so that it includes all of the following: css, scss, sass, eex, slim, ts(x), js(x), haml, svelte, liquid, tpl, latte, php, html, twig, erb