-
Notifications
You must be signed in to change notification settings - Fork 347
Support indentation to continue a function's argument list #82
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
Comments
Have you tried using haskell-indent instead of -indentation? I presume your reasoning is for if you want to provide arguments to whatever `foo' is; as such, wouldn't it actually be better for it to be indented more? |
Isn't haskell-indent really old? In the
|
Oh, and a <4> that's one space after "foo", of course, but only if foo had arguments. |
It seems that nobody wants to own this issue. Looks like it's not gonna be fixed. Will close in one month. |
I'm reopening this as it's a valid request imho and I have some hope this will be be implemented sooner or later (maybe I'll do it myself when I get to fix other |
Any progress here? |
This is still relevant and I'm often annoyed of this. If I'm not mistaken, currently is't hard to understand is function supplied with all arguments or not, so in first case indentation order should be -- (1)
return foo
1 ? 2
Same here: -- (2)
return $ foo
1 ? 2 Two following cases a bit complicated -- (3)
return $ foo bar
1 ? 2 I have no strong opinion what indentation steps should be here: -- (4)
return $ foo bar baz
_ ? ? ? ? Personally, I put arguments either on single line or one per line: foo bar baz quux
foo bar
baz
quux
foo
bar baz quux
foo
bar
baz
quux bur other people may prefer different ways. And in this case likely we have exact one indentation step -- (5)
return $
1 Finally, here -- (6)
return
1 2 Implementing first two cases seems to be pretty simple:
In case (5) indentation should be at position What do you think? |
When I hit Tab with the cursor at <> below:
I'd like the cursor to go here:
And if a $ was present, then:
I tried making the change myself in haskell-indentation.el, but I couldn't understand how the parser works. If you can tell me where to look, I'd be happy to try.
The text was updated successfully, but these errors were encountered: