I’ve used Emacs for a while with Purescript, but I’d like to switch to a more modern IDE. I’m trying VS Code, for instance. What I’m missing from the VS Code Purescript extension is code formatting. Is it available? Is it available for any other IDEs or editors?
What I mean is auto-formatting indentation of a region, or auto-indenting a line after hitting Enter on the previous line. I like how Emacs defines Tab to be auto-indent no matter where in the line your cursor is.
For VS Code, there is an extension API which supports formatting, either file or region, and I think the play here is to integrate purty with this. Hopefully similar with other editors.
I’m not using purty yet, so not sure if it’s “ready yet” - I got the impression it wasn’t quite there the last time I saw auto-formatting discussion but perhaps it has moved on since then
Is there anything specific you didn’t like about PureScript handling in Emacs? IDE fancies are provided by lsp-mode
, FWIW.
Disclaimer: I currently took over maintainership over Emacs purescript-mode and writing tests and fixing stuff. Original authors didn’t seem to have cared much besides forking off of haskell-mode
and renaming s/haskell/purescript. Tests were broken, CI didn’t work…
There’s still work to do, but I fixed quite a lot already, so it is already better than it was back than.
2 Likes