Refactoring and future plans #162
wkillerud
announced in
Announcements
Replies: 1 comment
-
Thanks for everything. Using your plugin is the only way to make vscode development sass experience comparable to jetbrains. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently shipped version 3.1.0 of Some Sass. I also published a new docsite to go along with the release.
The release adds support for
pkg:
imports. It’s also a big refactoring of the Some Sass language server. I want to share my motivation for doing so, especially since a few of you have reported that things broke for you with the release.Goals with the refactor
The internals of the language server are now more uniform. All features now use the same parsed data structure instead of being hacked together from two different parsers with my own stuff added to the mix 😵💫
One goal with this refactor and documentation is to make it easier for new developers to become contributors 👋
Another goal is to make it even remotely possible to add support for the indented syntax. We need a new parser to make that happen. It might never materialize, but it’s something I’ve wanted to try for a while now. This refactoring is step 0 on that path.
Looking into other parsers
Since this would be more or less a complete rewrite I spent time researching a couple of different parsers.
I ran an experiment with Lezer which started off promising, but I decided against it in the end. I ran into issues with parts of the Sass language it didn’t support, and I found it difficult to debug the grammar. Try it out if you’re in the market for a Sass parser that supports both SCSS and Indented. It might cover what you need, or you might be better at writing grammars than I am 😄
I briefly looked into the Unist ecosystem and sast. The ecosystem looks interesting, but I worried the risk of regressions was too big. The Sass parser and its backing CSS parser look unmaintained.
I landed on the parser I know, sticking with the VS Code parser for SCSS. I want to try adding indented support as an option in the existing (S)CSS scanner and parser inspired by
@lezer/sass
and its dialect setting.Continued maintenance
I know the refactoring brought with it regressions for some folks (not sure what, where or how yet), and I of course hope to fix any of those. There's also keeping up with updates to dependencies, and to Sass and CSS itself.
You can help
You can help, especially if you find a bug 🐛 Example Sass code that demonstrates the problem is a huge help. A pull request with a failing unit test or a bug fix is even better. If you’re up to it, read the contributor’s guide to get started ❤️
Beta Was this translation helpful? Give feedback.
All reactions