zignd / HTML-CSS-Class-Completion

:chocolate_bar: Visual Studio Code extension that provides CSS class name completion for the HTML class attribute based on the CSS files in your workspace
https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion
MIT License
253 stars 83 forks source link

Feature Request: Slim (Template) support #141

Open gencer opened 6 years ago

gencer commented 6 years ago

Slim is a Ruby HTML Template engine alternative to Haml and ERB.

It would be nice to see slim template engine support with this outstanding extension.

In slim, we use tabbed syntax and everything starts with . (dot) is a class. Everything starts with # (hash) is an ID.

Whenever we hit dot on keyboard, this plugin can start to show us possible class names.

Note: dots in strings ''/"" or followed by | does not count.

Sample:

.my-sass-class-1.another-class
    a#link-1.this-is-a-class class="we-also-have-this-too"
        | Hello.
#my-id.class

Reference: https://github.com/slim-template/slim

gencer commented 6 years ago

I will go with my drop-in replacement for this. See here

Reason I did not send Pull request was;

  1. I need it urgently on few environments. So local deploy is not something I want. I needed this extension install-able through marketplace.
  2. I've manually processed SCSS instead of how did you do in CSS. I thought you might reject and not like that. (again I did in need of urgent solution.)

If you are comply with my reasons, I can un-publish it, send you the pull request and go with your way. Until then I would like to keep my extension as it is.

muuvmuuv commented 6 years ago

You can use "html-css-class-completion.includeGlobPattern": "**/*.{css,html,scss}", to add other extensions.

gencer commented 6 years ago

@muuvmuuv, Of course that was the first thing I tried. This won't solve classes in a class, and magic class functions. My implementation just does it very well. Also, Slim support was a number one priority for me -which I solved it too-.

muuvmuuv commented 6 years ago

Ah, I understand, but why did you not simply created a fork and pull request for your feature? That would reduce duplicate plugins with the same functionality in the VSCode Marketplace?

Please ask the author about to merge with you extension :)

muuvmuuv commented 6 years ago

Ah sorry did not read your second comment. Anyway, I hope the author will be fine or you both find a way to make this plugin more scalable for future templates.