Hi, I think it's time to share the text editor I've been working on for a while: https://github.com/Nimaoth/Absytree
You can try the online demo here: https://nimaoth.github.io/AbsytreeBrowser/
It also runs natively on the desktop and in the terminal (althouth the terminal version has more bugs and the keybindings aren't optimized for that)
It's mainly inspired by Vim/Helix/VsCode, so keyboard focused, extendable, fast (hopefully ^^).
It supports nim script and wasm as scripting languages (atm the same config file is loaded as nimscript and compiled to wasm).
It's not quite usable yet (at least not without some annoyances), but my goal this year is to make this my main editor
I'm also using this editor to experiment with a tree based language framework, similar to JetBrains MPS (https://github.com/JetBrains/MPS). You can see examples of that in e.g. a.ast-model. I also did some of advent of code with this, which you can see in e.g. aoc_day9.ast-model
Feedback is welcome :)
Thank you for using chroma, vmath, ws, windy, and boxy!
It looks like you forked some repos to fix issues. I should fix these issues in my versions as well.
vmath - figure out JS object support. windy - some thing with Nim2.0 boxy - I think I added "ability to render to framebuffer instead of screen" ws - this is probably correct sleep behavior.
Since you mentioned MPS, are you planning for Absytree to be a Projectional Editor?
@nimaoth I just noticed that you mentioned https://dion.systems/gallery.html as the inspiration. Their ideas are great - can you say more about features you have implemented or planning to?
Also, in the future, is the smooth scrolling going to be a possibility?
What's currently implemented is a basic projectional editor, where the AST gets converted to another tree (cell tree) which can be rendered and edited. The edits to that get applied to the underlying AST.
There's currently no advanced projections like e.g. tables or color pickers, but it can render the AST in a way which looks a lot like regular code.
You can also define languages by defining the structure of the AST, how the projection looks, how types are calculated and how it gets translated to WASM.
So you could for example define a language which has expressions nodes, binary expression nodes and number literal nodes, where the binary expression and number nodes would be subclasses of expressions.
Then you can define a type system (which also gets represented by AST nodes) and e.g. a function which calculates the type of a binary expression or number literal. You can also define how scopes are calculated (a scope is basically the set of nodes which can be referenced by a specific node).
There are a few builtin languages
In the future I plan to implement things like:
Smooth scrolling was a thing a while ago already, but I think I commented the code out because back then performance wasn't that good, but I'll add that again at some point
I finally decided to do a new release (0.2.1), which brings too many updates to list them all.
The most important thing is that the editor is now actually usable. I've been using it for the last few months now and it has been a lot of fun. My current setup is Windows + WSL + Zellij + Absytree which works quite well, but I also regularly run it natively on windows in both the terminal and GUI.
Obviously there is still much work to do, but it's very rare now that I need to use another editor for something.
Here is an incomplete list of changes
I haven't made any progress on the AST language stuff, that will probably happen later this year.
If you want to try it out there are prebuilt binaries for Windows and Ubuntu, and the terminal version is also available as a statically linked binary with musl which should hopefully work everywhere. Or you can build it yourself.
I also added some documentation on how to do some configuration and some features.
Feedback and contributions are very welcome ^^
Great project! I hope to be able to switch to it some day.
When I launch the editor and move the cursor down, several blank lines appear at the top of the page. Is it a bug or a feature?