prompts don't work correctly when using @use with namespace
flamebergh opened this issue · 6 comments
- VS Code Version: 1.44
- SCSS IntelliSense Version: Version: 0.9.0
- Operating System: Windows 10
Reproducible Case:
the extension's prompts working correctly with @use
only when importing with asterisk like @use 'firstfile' as *
Steps to Reproduce:
- create 2 scss files
- in first file write some mixin
- in second file import first file with namespace as
@use 'first'
or like@use 'first' as mixins
; - try to use your mixin as
@include first.
or@include mixins.
then you won't see some suggest. And it will never suggest you the namespace (first
ormixin
, that we used before)
The Issue
Both @use
and @forward
are treated as @import
. It works, but it means you can't use anything like namespaces. In addition, placeholder selectors from modules don't show up on IntelliSense at all.
Stuff that needs fixin‘
This should definitely be implemented.
It has now been about 2/3 years that the new module system (i.e. @use
/@forward
) has been added to Sass, but we still don't have proper intellisense for it :(
@mrmlnc Any ideas, Denis?
I agree on @AradAral request.
@import
is deprecated already and using namespaces is the default behaviour.
Imho, Intellisense should look for imported modules in the current sass file only and using the new dart-sass syntax. This should improve speed and would be much more efficient since it would only suggest vars that you actually needs.
Holy moley, this isn't implemented yet? So there isn't any Intellisense supporting this?
Are there any alternative extensions which could handle namespaces at the moment?
@tobradex and anyone else in the same boat, check out the Some Sass extension. I haven't tried it with all of the newer Sass features, but it claims to work with @use
. The developer frequently updates it, so it seems much more likely to have support added for issues raised there.