abo-abo / lispy

Short and sweet LISP editing
http://oremacs.com/lispy/
1.21k stars 132 forks source link

[bug] easy to get lispy into a bad state where it refuses to insert valid parens #539

Open betaprior opened 4 years ago

betaprior commented 4 years ago

See the gif below for a minimal illustration. In short, it seems quite easy to get lispy into a state where it refuses to insert a closing paren where it belongs. It would be really helpful if there was some sort of a reset/override mechanism to force this paren insertion; I haven't found anything to work other than disabling lispy, which is annoying.

This typically happens when a non-lispy command is used to modify s-expressions in a way that (temporarily) unbalances parentheses. Ideally the user wouldn't do that, but it's not unreasonable to expect occasional non-lispy-style edits due to muscle memory, etc. It would be nice if the mode allowed to ad-hoc fixup parens, if it allowed such ad-hoc breakage :)

lispy-bad

noctuid commented 4 years ago

It looks like you are using evil. I think existing packages handle preventing unbalanced parens well enough (e.g. evil cleverparens and lispyville). Also, you can C-q ) in this situation.