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

Smarty support #50

Closed SharakPL closed 4 years ago

SharakPL commented 4 years ago

Please add support for Smarty files.

Required extension e.g. Smarty Template Support, Language name: "smarty" File extension: .tpl

gencer commented 4 years ago

Ah, Smarty! My old friend. Was using in old days with PHP.

I will add this to supported frameworks as soon as possible.

gencer commented 4 years ago

Why did you removed your comment. I was going to reply that :)

Anyway, Here you go please try and report back.

We will go through this.

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

SharakPL commented 4 years ago

Thanks :) Unfortunately I can't test smarty support. There's a bug right at the start. Extension can't scan the workspace. There seems to be a problem with handling urls in the code. Didn't happen with previous version. obraz

Maybe it requires http(s):. Should it scan online resources by default?

obraz

gencer commented 4 years ago

Well, This is because of a new feature from #49. In the past remote urls have to be given by config file, after #49, HTML is being parsed and remotes automatically downloaded.

Let's add guard check for those URLs. Give it a try:

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

SharakPL commented 4 years ago

I don't think it's a good idea. Most of the time it will create a lot of useless traffic and waste resources to scan online files that aren't even needed. Any online resource should be scaned only if explicitly requested by the config. This one should be default:

"html-css-class-completion.searchRemoteGlobPattern": "",

SharakPL commented 4 years ago

It seems to work fine now :)

gencer commented 4 years ago

@SharakPL , You're right!

I made searchRemoteGlobPattern empty by default as you suggested. I will push to master. Do you want a pre-build for this change? --- here it is just in case..

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

SharakPL commented 4 years ago

Thank you very much :)

gencer commented 4 years ago

I'll go ahead and close this issue as resolved. Let me know if something doesn't work.