Shower thought: if you have a code formatter, you don't need to ever insert newlines yourself.
You could repurpose the enter key for something else entirely!
What would you use this large key for? My first idea is go-to-definition.
Related Posts
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.
Today I learnt that Lua projects often use *3* spaces for indentation! https://github.com/luarocks/lua-style-guide/blob/master/README.md#indentation-and-formatting
I initially thought something was very wrong with editor config.
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!