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 support for auto import/use #134

Open
dkniffin opened this issue Feb 23, 2021 · 2 comments
Open

Add support for auto import/use #134

dkniffin opened this issue Feb 23, 2021 · 2 comments

Comments

@dkniffin
Copy link

dkniffin commented Feb 23, 2021

I would like to stop using globally defined SCSS variables and instead add an @import/@use in the files that need them. However, right now I think that would mean manually adding those import statements to the top of my files when I reference a variable or mixin.

I would love it if this extension could automatically add those imports for me, in the same way that the JS and TS autosuggests do.

@dkniffin dkniffin changed the title Add support for auto import Add support for auto import/use Feb 23, 2021
@TheElegantCoding
Copy link

Sass is deprecating his @import to use @use, now this has some advantages but is a pain in the ass for someone like me that has space variables, color variables, border variables, mixins for responsive, etc.

if i code in modules and components and i code a _hero.scss component i have to import manually all the imports in the sass file that slows me a lot and for every component for every piece of code i have to do this

Now, vscode has an auto import setting you configure it like this

  "editor.codeActionsOnSave": {
    "source.addMissingImports": "explicit",
  },

In js, tsx, astro, svelte, etc all these special files have features for auto-importing what you need, this should be added in sass extension also for improve the speed

@TheElegantCoding
Copy link

TheElegantCoding commented Oct 30, 2024

I'm sad to see this feature request was created in 2021 and no response from the team, 3 years for one of the more important features, and now is more important for what I mentioned above

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

2 participants