How did we get here?
If you did not expect the author to be some random guy that had rarely even been using Macaulay before, then don’t worry as so did I. After I’ve opened iot once to make some calculations, I’ve noticed that it was probably the last alive language on Earth with no language server implemented yet. I thought it must be a fun hobby project to work on next month. 11 months later the alpha build is here, together with every single shower thought of anything that could potentially be build from that.
After all I ended up with way more of them than I’ve expected, so that releasing them one by one would be a bit of a pain, so I decided to bundle them all together into one bundle where I could manage tyhem all together and youy could browse them all together.
Tools included
- Language server: static code analyzer including, type-checker, formatter, linter and fully featured language server. It’s written in Rust and fully independent on M2, so you can use it even on Windows.
- spectral-m2: A new shell preserving the good old experience with some new refreshed TUI interface and new renderer supporting rich highlighting and customisable styling.
- tree-sitter: Fast, incremental parser with rich syntax highlighting
- MarkdownDocs: Generating documentation as markdowns and mdbook-based web builder, giving documentation a fresh look.
- macaulay2.fun: A web service hosting the docs build with
mdbook - VSCode extension: Porting LSP and tree-sitter to work in VSCode
- mdbook-tsitter: Preprocessor for
mdbookthat uses tree-sitter, making it properly highlight m2 code blocks. - Neovim plugin: Mostly for ease configuration of LSP and tree-sitter, with a few extra features like inline cell evaluation.
- m2-syn Rust crate with native parser generating fully typed AST, syntax tree traversal, AST renderer
Tools in late WIP stage
- ProceduralMacros Macaulay2 native procedural macro engine
- m2-syn Macro engine and fully incremental parsing
- Macaulay2 Book A restructured documentation making it more casually readable rather than serving as fully generated reference
- New documentation API See the Proposal chapter
What is still lacking
Proper emacs support and integration. As I’ve never used emacs, the bundle was developed possibly in parallel with the popular emacs developer environment. This doesn’t mean that emacs compatibility is an actual issue, but rather I just don’t feel competent to provide a proper support for it, and that I may have duplicate some systems that already exist there for ages.
Who it’s for
Every m2 user is likely to find something that will make his life easier - trying out the language server is probably a good starting point.