I always wonder if there is a better way to indicate grouping than using parentheses, which is rather one dimensional and easy to lose track of even with editor’s assists. Ideally the textual representation can remain using parentheses, yet the editor could potentially use a better on-screen representation. It’s easier with indentation only highlighting, for which the editor can draw a line indicating the indentation level.
There are rainbow-delimiters and the likes, but it just becomes angry fruit salad once the nesting level increases. Does anybody tried dynamic background colors, so different background colors (maybe differ in saturation only) show different levels of parentheses group?
Full-fledged structural editors do this. The best I know of is Fructure, which works on Racket: https://github.com/disconcision/fructure
It has a very sophisticated visualization system for code structure. I haven’t used it myself since I don’t write much Racket but I did try my hand at building my own for Fennel: https://git.sr.ht/~technomancy/anarres My visualization isn’t nearly as nice as Fructure’s tho, and I ended up putting the GUI implementation on hold in order to focus on the core editing flow and falling back to a textual representation for now (in the term-only branch). I do hope to revisit the visualization question in the future once I get the basics working as it’s a fascinating problem that I feel is largely overlooked.
Looking forward to see the terminal version in action. The demo you did at fennel-conf was really cool
I’ve tried a few experiments, from a touchscreen direct manipulation paradigm, that might be at least visually interesting:
While neat, this project is no longer maintained and has been archived by the owner.
There are maintained ports for Vim, NeoVim, Kaokune, Emacs (and Doom Emacs) - I’m also not convinced it won’t work just for being archived.
I absolutely love this, and will be making a point try it out when things settle down. I’ve always struggled with making the jump to Paredit / Lispyville, partly because of the complexity of making evil’s keybinds play nice with them, but mostly because I just have Lisp to be writing haven’t put aside time to learn to manage these systems.
This documentation is amazing, and reminds me of the homepage for Elastic Tabstops in that it’s similarly (if not so formally) clear. Maybe in another world these ideas would be available for more than just those with the interest and skill to seek out and install (or impliment) these unique approaches.