Closed luntain closed 6 years ago
In this case, if ,
or }
is entered in the next line, the indent will be 4
. Isn't is sufficient?
That would be sufficient. Is it what happens now? I don't see that behavior in my setup.
It isn't automatically done, TAB is required.
It may be possible to achieve automatic indent by electric-indent-mode
.
But haskell-mode
disables it now for some reason, so it may cause unexpected behavior.
Below is untested code.
(add-hook 'haskell-mode-hook
(lambda ()
(setq electric-indent-inhibit nil)
(setq electric-indent-chars '(?, ?\})))
I didn't press TAB. That helps.
When I define a record data type or value of a record data type per the style guide, I would like the cursor to be under the previous comma/opening brace.
Instead, this mode places the cursor under the first character of the type or value assigned to a field. I see that this behavior is tested for:
How about: