Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions indent/haskell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ function! GetHaskellIndent() abort
return match(nonblankline, '\v^\s*%(<where>|.*<let>)?\s*\zs') + &shiftwidth
endif

if nonblankline =~# '\v<do>\s*[[:alnum:](]'
return match(nonblankline, '\v<do>\s*\zs\S')
endif

if nonblankline =~# '\v<deriving>'
return s:indent('', '\v^\s*\zs<data>', 0)
endif
Expand Down
2 changes: 2 additions & 0 deletions test/do/do_same_line.in.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
main = do print "hello"
print "world"
2 changes: 2 additions & 0 deletions test/do/do_same_line.out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
main = do print "hello"
print "world"
Loading