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

It doesn't work with .html.erb files #45

Closed ricardoruwer closed 4 years ago

ricardoruwer commented 4 years ago

I couldn't make it work in .html.erb files!

When I'm editing a pure HTML file:

But when I change to .html.erb:

I'm currently using the Ruby extension https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby

gencer commented 4 years ago

Hi @ricardoruwer i think i might found the issue.

To make sure i found the right issue source, can you install this and try the following syntax highlighter?

https://marketplace.visualstudio.com/items?itemName=CraigMaslowski.erb

After installing this, if it works then we will handle this in the future.

ricardoruwer commented 4 years ago

Thank you for the quick answer ❤️ I installed this new extension, and:

The Emmet doesn't work: e.g. when I type h1 and press TAB it doesn't create the <h1></h1>.

But the IntelliSense works :) e.g. when I type <h1 class=""></h1> the HTML classes appear in the list...

ricardoruwer commented 4 years ago

Actually, I'm not sure... 🤔 Forget what I said...

I think this extension you said makes no difference... When I change the language mode (CMD+K M) and type erb I have 2 options on the list:

In this html.erb nothing works (emmet and any other autocomplete) (I don't know if the emmet operation is a responsibility of this extension)

And in this erb just the class completion works; e.g. when I type <h1 cla there is one class on the list, and when I select it, it completes just with class but I think it might complete with class="", you know? And when I type e.g. <h1 class=" the class completion works

But apparently this extension you said https://marketplace.visualstudio.com/items?itemName=CraigMaslowski.erb makes no difference to this

gencer commented 4 years ago

Hmm.. Strange. Let me evaluate on a fresh installation.

ricardoruwer commented 4 years ago

It'll be nice to add support for Elixir (.html.eex) files as well 😄

gencer commented 4 years ago

.eex extension added.

gencer commented 4 years ago

.eex support has been released on marketplace. You may need an another extension to trigger language specific things.

clementoriol commented 4 years ago

Thanks for the eex support ! However, the language name seems incorrect, so it doesn't work.

The 2 major language extensions for Elixir uses different language names :

Could you please add HTML (Eex) and HTML (EEx) support ? That would made this plugin the first to support this feature for elixir afaik, since all the other ones seems inactive.

Thanks !

gencer commented 4 years ago

I didn't know that one exists. Yes, As soon as i back to home, i will add this support.

P.S.: You will need those extensions as well to work with this extension. They are dependent.

clementoriol commented 4 years ago

Amazing, thank you for responding so quickly ! 👍 💯

gencer commented 4 years ago

BTW, a quick question while im on remote:

It is HTML E(E|e)x, right? Not EEx and Eex. It has 'HTML' at start.

Update: Yup. Checked on GitHub it is indeed.

clementoriol commented 4 years ago

Yes !

Here are the exact names for both cases : HTML (Eex) HTML (EEx) They both contains HTML and parenthesis.

gencer commented 4 years ago

Okay. I will prepare a custom build as soon as possible -and push to master-

Please also note that, This will also includes #49 and #50. #49 is about fetching remote stylesheet from meta links in HTML compatible files instead of permanent setting in vscode.

gencer commented 4 years ago

v1.7.0 (Updated again)

@clementoriol, Please can you try this version: If you downloaded this, re-download again

html-slim-scss-css-class-completion-1.7.0.zip

I didn't tested yet so i await your feedback

clementoriol commented 4 years ago

@gencer Ok, so I had time to test this ! Tested both with vscode-elixir and ElixirLs extensions.

Did you had the chance to add both languages ? I know the case difference is a bit annoying, but sadly the libraries haven't done anything yet to harmonize it, afaik

gencer commented 4 years ago

Interesting. See, I already added EEx and Eex (lowercase and uppercase). I will try to find out why it didn't worked.

clementoriol commented 4 years ago

Nevermind, it actually works, I guess it just took some time to index the scss :) So, looks good to me, thank you 🎉🎉🎉

gencer commented 4 years ago

Ahh :=) No worries! If your project is big, it might take some time to warm up on first time. Later, it will incrementally build and re-cache.

Changes are on master. I will publish v1.7.0 on marketplace soon.

gencer commented 4 years ago

@clementoriol I found the issue. Fixed in master will be published in few minutes on marketplace. Please test v1.7.1 for EEx (uppercase E)