-
Notifications
You must be signed in to change notification settings - Fork 5
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
electric-indent-mode breaks layout #7
Comments
To clarify myself let me explain when re-indent occurs:
When I insert newline after
|
Hey @geraldus - thanks for the info! I have this pulled up right now, but I'm actually not able to reproduce it - all of the indentation for newlines seem to be working correctly with electric-indent-mode turned on (though I'm probably not reproducing it correctly). I'll play around with it a bit more; if you have a basic |
I think I would be able to provide minimal init file (: Will try to find some time tomorrow. |
Hmm… With minimal config I can't reproduce this too! What is really weird that in both cases I have same function bound to RET, namely
Here is a list of modes I have in minimal config in hamlet buffer:
And this is with full config
(Please excuse me for these lists, but maybe you'll spot something). |
I've debugged this a bit, with my full config |
Hey @geraldus - no problem, thanks for the additional info. I haven't had a chance to pull this back up with the new info just yet but I hope to this weekend. FWIW, |
@CodyReichert yeah, I've already noticed that Meanwhile, can you please check the result of
where Also, please try to |
Ok, if I go this way
On other hand
In first case issue appears, in second case does not. |
I can confirm that I'm facing this issue too on spacemacs + Intero. |
Hey all, thanks again for following up on this issue. I'm unfortunately swamped right now and haven't had time to investigate this at all. I'll happily take any PR's or (more) clues if anyone would like to address this. Otherwise I'll do my best to get to this when I get a slice of time. I think a couple of the new issues ( #11 ) may be related? |
Hey @geraldus and @saurabhnanda - a PR was just opened ( #12 ) that should fix some indentation issues. I haven't tried it yet myself, but I hope to today. Are either of you able to give that branch a spin and see if it fixes this specific issue? If so, I'll merge it ASAP. Thanks again. |
What's the easiest way to install this in spacemacs?
|
@saurabhnanda Hi. I’m the author of the PR. On ordinary emacs, the fastest way is to copy my patched shakespeare-mode.el, and paste it to an empty emacs buffer, then call I'm not accustomed to spacemacs, but it would be almost the same, maybe. |
Hey @geraldus - a new version will be on MELPA shortly that should help with these issues. Would you mind giving it a go and letting me know how it works? It works great for me, but I was unable to reproduce the original issue. Closing for now, but feel free to re-open or continue the discussion. |
@CodyReichert sorry for such long delay. I'll try to check it out soon (I do not have Yesod projects right now)! |
Sooo... any progress here? |
With
electric-indent-mode
turned on I have to insert newlines with C-j, if I insert newline with RET it causes re-indent of previous line.C-j places point at line beginning
M-j places point where it would be is press TAB at line beginning (this is the same if I hit RETTAB with disabled
electric-indent-mode
).UPDATE: hmmm… looks like M-j is doing the job well.
I believe proper indentation for hamlet files is quite tricky and complicated task (as in Haskell mode), but is there a way to prevent re-indenting of previous lines?
The text was updated successfully, but these errors were encountered: