justinbarclay / parinfer-rust-mode

Simplifying how you write Lisp
https://shaunlebron.github.io/parinfer/
GNU General Public License v3.0
234 stars 17 forks source link

Use Paren Mode Around Yanking #4

Closed justinbarclay closed 4 years ago

justinbarclay commented 4 years ago

When pasting code into a lisp document, paren mode should be enabled to make sure code stays aligned regardless of the amount of whitespace in all lines.

andreyorst commented 4 years ago

Perhaps related to #12 ?

justinbarclay commented 4 years ago

I think it definitely could be. But for now it's also added as a default to the tread-command-as system.

This is still open because I haven't been able to test it too much lately, due to work being mostly backend. That and I knew it didn't behave the way I wanted to when yanking code because it would leave some code too indented. I've just pushed a small patch that also clears out any changes tracked in the buffer when the treat-command-as system is in effect. So hopefully, once I have more time to test, I can validate my changes and close this issue.

andreyorst commented 4 years ago

Slight update.

I've been copy-pasting a bunch of code lately and everything worked fine.

justinbarclay commented 4 years ago

This should be working now. The yank and pop-yank commands are under the treat-command-as system, so parents should still be maintained. Any breakage there is more to do the the system itself and less with the command.

Thanks to @andreyorst helping to confirm this is working I’m closing this feature request.