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

Add customize option to *not* indent region after e.g. slurping in certain modes #493

Closed
rpglover64 opened this issue Aug 5, 2015 · 5 comments

Comments

@rpglover64
Copy link

Certain modes have a broken indent-region (c.f. haskell/haskell-mode#796), and smartparens would be more useful it it didn't try to reindent after modifying the document in these cases.

@Fuco1
Copy link
Owner

Fuco1 commented Aug 5, 2015

See this: #403

Maybe we should extend that setting to all the "post-command automatic attempts to fix indent".

If someone cares to take it up, I wouldn't mind. This is a low priority task for me right now, unfortunatelly I barely have time to work on the "important" issues anymore :/

@rpglover64
Copy link
Author

I noticed that and started hacking something up, but I wasn't sure which commands to do reindent for and which ones not to.

@Fuco1
Copy link
Owner

Fuco1 commented Aug 5, 2015

Well, if the indent breaks thing then I guess it makes sense to either have it or not at all.

But I think a better approach would be not to call reindents at all from the body directly but add it as a hook action. Then users can add or remove the hook as they like... and we can remove it in the smartparens-foo.el config files for the languages where it makes no sense by default. Most interactive functions should raise an event which can be catched with the pre/post handlers, and if they don't that functionality should be added. (see sp--run-hook-with-args in various commands).

Because this global approach is not going to give us too much control. It's probably a good temporary solution though.

@Fuco1
Copy link
Owner

Fuco1 commented Nov 8, 2015

This is handled in #494 and #513

@Fuco1 Fuco1 closed this as completed Nov 8, 2015
@rpglover64
Copy link
Author

It's not fully solved yet... for example, slurping and barfing still cause the indentation issue.

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

No branches or pull requests

2 participants