Scastie IDE features

Scastie is an online editor for Scala working as a standalone website on both mobile and desktop platforms and also provides API for embedding it into other projects. It is currently available at https://scastie.scala-lang.org/ and is used by about 1k unique daily users.

At the moment Scastie is nothing more than a plain text editor which allows you to compile your code snippets with specified dependencies.

This is why we are currently working on adding interactive features to the code editor.

Roadmap:

This thread presents current state of the this project and will be updated along with development status. We would welcome any comments or suggestions.

10 Likes

I think another priority should be put to enabling macros to be described in scastie (which require separate compilation modules).
This is very crucial to be able to document macro examples that “just work”, and to report compiler macro bugs without pushing a complete project to a public repo.

9 Likes

Additionally, it is worth noting that such (great) changes that were applied recently significantly affected embedded scastie code. This can easily break websites silently that rely on the current state of scastie. I imagine no-one enabled embedding thinking that it commits scastie to maintain some compatibility, but as this tool grows more popular, this should be given extra thought. Maybe a way to embed a specific version of scastie, so the default scastie website can advance without harming previous embedded version users?

6 Likes

The metals support for Scastie is now officially deployed! You can try it here. As mentioned in the first post, for now, it supports hover and autocompletion, but I hope that with the time, we will add more and more features to it.
As always, all I encourage reporting all the issues you encounter, as it will benefit all the users.

20 Likes

This is really cool!

BTW: I just noticed one irritating thing. When pressing “Format” there are non-idiomatic spaces inserted in many places and I think the scalafmt settings should include spaces.afterKeywordBeforeParen = false instead of the opposite. @rochala

Thanks for kind words, I hope that more feature will be added over time!

BTW: I just noticed one irritating thing. When pressing “Format” there are non-idiomatic spaces inserted in many places and I think the scalafmt settings should include spaces.afterKeywordBeforeParen = false instead of the opposite. @rochala

That is correct, and it is a known issue available here: Fix the formatting · Issue #739 · scalacenter/scastie · GitHub
I’m uncertain if this is the problem because as far as I know println is not a keyword, and it also adds a space between parenthesis.

2 Likes