Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting work for some file formats #2

Open
kytosai opened this issue Jul 5, 2019 · 5 comments
Open

Add setting work for some file formats #2

kytosai opened this issue Jul 5, 2019 · 5 comments

Comments

@kytosai
Copy link

kytosai commented Jul 5, 2019

I open setting.json and this extesion show comment in close bracket in .json file

Demo: https://drive.google.com/uc?id=1v86RnO-NkhyGOP4dC7BOO7AmmL2hKXpy

Please add setting to set plugin work for some file formats

Thanks !

@ffpetrovic
Copy link
Owner

Hi @kytosai ,

Thanks for the recommendation. Yes, I saw this problem very soon after I published it, just never got around to it. Just for reference, I will make it work only for .scss file extensions, since it was built very "niche" like this. If needed, I will try to make a similar library for other file formats in the future.

I'll try to get this fixed soon.

@SharakPL
Copy link

@ffpetrovic Really helpful extension and it even works on other files too. I suspect it basically reacts to every { } in any file so the name of this extension is rather unfortunate. Should be simply Scope Helper :) It could use some improvements though, since in some languages a standard is to have opening brace in new line and so far this extension expects to have "label" in the same line. Otherwise it shows only // after }. PHP PSR-2 standard is to use { in new line for classes and functions, but in the same line after 1 space for all logic inside functions so it would be good if it checked also 1 line before { if generated label is empty.
Also there's not much point to add helpers for small blocks. It looks quite messy and doesn't help at all:

.container {
  .description {
    color: $color-description;
  } // .description
  .accent {
    color: $color-accent;
  } // .accent
} // .container

Scope should be at least 4-5 lines to generate helper label:

.container {
  .description {
    color: $color-description;
  }
  .accent {
    color: $color-accent;
  }
} // .container

@ctf0
Copy link

ctf0 commented Jan 30, 2020

same here in php files too, the decoration leak is very frustrating

@Yegorich555
Copy link

Do we have any updates today?

@vishiri
Copy link

vishiri commented Jun 22, 2022

I don't know if anyone is still watching this extension in any way, shape, or form, but I did a very crude (but also very functional) fix to the extension in this fork I made: https://github.com/Elvanos/scss-scope-helper
It limits the functionality to SCSS and Stylus files and ignores the rest. You apply this by overwriting the JS extension.js file contents of the original extension with the content of the forked file - I couldn't be arsed to upload this anywhere nor compile it correctly since it was such a minor fix mostly for personal use. If anyone wishes to do that, feel free to re-fork it from my fork and upload it to the extension store. As for the rest of y'all, enjoy the fix if you can be bothered to add it to your extension manually!

As for @ffpetrovic - You can use the fix from my branch to basically insta-fix the issue (or even add more file formats for the whitelist) and update the extension on VScode's store in like... 5 minutes. :)

Repository owner deleted a comment from Obasoro Feb 20, 2024
Repository owner deleted a comment from yawoffeh Feb 23, 2024
@github-staff github-staff deleted a comment Apr 26, 2024
@github-staff github-staff deleted a comment Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants