Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional toublesome modes #101

Open
gilch opened this issue Aug 12, 2024 · 1 comment
Open

additional toublesome modes #101

gilch opened this issue Aug 12, 2024 · 1 comment

Comments

@gilch
Copy link
Contributor

gilch commented Aug 12, 2024

I notice that in my config I've got electric-indent-mode and smartparens-mode added to the parinfer-rust-troublesome-modes list.

I think we could also add to that aggressive-indent-mode, although that one might actually be useful in paren mode, it makes smart and indent modes unusable, and I think electric-indent-mode would cause similar problems but haven't tried to reproduce it lately.

smartparens-mode likes to keep brackets balanced, which makes indent and smart 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 to electric-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 for paren mode and one for indent/smart modes. They could be disabled again when you switch into that Parinfer mode and put back how they were when you switch out.

@justinbarclay
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants