subpar
subpar copied to clipboard
petit paredit?
https://github.com/laurentpetit/paredit.clj ... Would a cljs version be trivial? If so, subpar could use it instead.
But if it uses a lot of things unsupported in cljs (that is, if creating a cljs version would be nontrivial), subpar could still be improved by having a similar consistent return value from paredit. A lot of hard coded stuff in core would be obviated.
The return value should probably be [1] a list of replacements to make if any, [2] a new cursor position, [3] a range of lines to re-indent if any. Cursor position should be set before re-indentation so we don't have to figure out the change due to it.