Skip to content

Commit 735f95e

Browse files
committed
stricter let indentation
1 parent 5b77220 commit 735f95e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

indent/haskell.vim

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,20 @@ function! GetHaskellIndent()
197197
" >>>>y = 2
198198
if l:prevline =~ '\C\<let\>\s\+.\+$'
199199
if l:line =~ '\C^\s*\<let\>'
200-
return match(l:prevline, '\C\<let\>')
200+
let l:s = match(l:prevline, '\C\<let\>')
201+
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
202+
return l:s
203+
endif
201204
elseif l:line =~ '\C^\s*\<in\>'
202-
return match(l:prevline, '\C\<let\>') + g:haskell_indent_in
205+
let l:s = match(l:prevline, '\C\<let\>')
206+
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
207+
return l:s + g:haskell_indent_in
208+
endif
203209
else
204-
return match(l:prevline, '\C\<let\>') + g:haskell_indent_let
210+
let l:s = match(l:prevline, '\C\<let\>')
211+
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
212+
return l:s + g:haskell_indent_let
213+
endif
205214
endif
206215
endif
207216

0 commit comments

Comments
 (0)