Open savetheclocktower opened 1 year ago
Are you aware if the completions SCSS files need would be any different? Since our COMPLETIONS.json file doesn't have anything that's SCSS specific, so I wonder if we would want to add those in, or if we are currently only providing value completions
I don't think they would be, but I did only glance at it. I think it could reuse the logic it uses for old-style Sass files.
Do you think this was covered by #601 Admittedly I didn't test SCSS much at all during that PR
No, didn't address it. The SCSS grammar is separate from the Sass grammar. There's a third-party tree-sitter library for SCSS, but it's not quite where it needs to be, so to make this work I'd have to spend some time with the builtin TM-style SCSS grammar.
No, didn't address it. The SCSS grammar is separate from the Sass grammar. There's a third-party tree-sitter library for SCSS, but it's not quite where it needs to be, so to make this work I'd have to spend some time with the builtin TM-style SCSS grammar.
Thanks a ton for clarifying, just wanted to double check so we could close it if need be. Didn't realize they were separated out
Have you checked for existing feature requests?
Summary
The
autocomplete-css
package has two big problems: (a) it doesn't seem to suggest things correctly when (legacy) Tree-sitter grammars are used, and (b) it doesn't have any code to handle SCSS syntax (as opposed to the old Sass syntax that had no braces).The first item is low priority because we're about to phase out those grammars, and I'll make sure the modern Tree-sitter CSS grammar doesn't make the same mistake. But we should update all the Sass code paths so that they check for SCSS-specific scope names in addition to the Sass-specific scope names.
What benefits does this feature provide?
CSS autocompletion will work inside of SCSS files.
Any alternatives?
Don't think so. The whole reason there's a Sass-specific code path in the provider is that Sass blocks can be nested and CSS blocks can't. So the provider needs to know what mode it's in so that it knows whether it can suggest things like tag names.
Other examples:
No response