wkillerud / some-sass

Improved support for SCSS, Sass indented and SassDoc. Workspace awareness and full support for Sass modules.
https://wkillerud.github.io/some-sass/
60 stars 5 forks source link

Missing or wrong suggestions using the rule @forward with prefix #201

Closed MenSeb closed 1 month ago

MenSeb commented 1 month ago

Hey, it's me again, sorry! haha

There seems to be more logic to update regarding the forward rule.

This time it includes logic using it with prefix, i.e. @forward './test' as test-*;

There are multiple test files to showcase different missing or wrong suggestions.

I left comments in each one of them for clarification, if it needs more details, please let me know.

The example repo, https://github.com/MenSeb/some-sass-bug, is up to date!

Previous issue: https://github.com/wkillerud/some-sass/issues/190

P.S. Let me know if you prefer code examples directly here for future reference.

wkillerud commented 1 month ago

No need to be sorry, all of these tests and bug reports are super helpful 🥳 Linking to a repo with code examples works fine, no need to duplicate them in the issue 👍

wkillerud commented 1 month ago

https://github.com/MenSeb/some-sass-bug/blob/1e85baf507cac5d1f22747ca68de385d9487f60b/src/test1.scss#L4

This was from a weirdness in the slightly-too-complicated completion context that made it so only variables got suggested after @debug. I tried simplifying a bit in https://github.com/wkillerud/some-sass/pull/202/commits/115966533bfc4fe316bdac7bc55e6baf17d7060a so now utils() gets suggested.

https://github.com/MenSeb/some-sass-bug/blob/1e85baf507cac5d1f22747ca68de385d9487f60b/src/test1.scss#L8-L9

Correct, it shouldn't suggest without prefix. Fixed in https://github.com/wkillerud/some-sass/pull/202/commits/b65d8b17c5854b3708270877b0550858e028100c

Fixed in 3.5.0

MenSeb commented 1 month ago

Thanks @wkillerud it works well now :)