This should be easy to achieve with
:set formatoptions+=ro
or :se fo+=ro
for short.
With r
and o
in 'formatoptions'
, Vim attempts to insert the comment "leader" including indentation on new lines inside a comment (that is, a non-comment in literate Haskell).
To make this setting automatically, set up an autocommand in your vimrc.
autocmd FileType lhaskell setlocal formatoptions+=ro
Tip: Use CTRL-U
to remove the auto-inserted leader when you don't need it.