Open gilch opened 3 months ago
Thanks for the input.
I've limited the modes I disable to those built into emacs and turned on by users. However, if users are experiencing issues with third-party packages, I am open to accepting PRs to add those packages to parinfer-rust-troublesome-modes
.
I am unwilling to maintain separate lists for each of Parinfer's modes. This is primarily because I want to keep things simple to think about and maintain. However, I would support a PR that adds a hook that is called whenever parinfer-rust-mode
sets the mode
, which should empower others to have more precise control over when an Emacs mode is enabled or disabled.
I notice that in my config I've got
electric-indent-mode
andsmartparens-mode
added to theparinfer-rust-troublesome-modes
list.I think we could also add to that
aggressive-indent-mode
, although that one might actually be useful inparen
mode, it makessmart
andindent
modes unusable, and I thinkelectric-indent-mode
would cause similar problems but haven't tried to reproduce it lately.smartparens-mode
likes to keep brackets balanced, which makesindent
andsmart
modes a lot less useful: instead of allowing Parinfer to infer the position of the closing bracket, it inserts the closing one immediately after typing the opening one, similar toelectric-pair-mode
, which is already considered troublesome.The modes which are troublesome depend on whether Parinfer is in
paren
mode or not. Maybe there should be two troublesome modes lists, one forparen
mode and one forindent
/smart
modes. They could be disabled again when you switch into that Parinfer mode and put back how they were when you switch out.