This commit is contained in:
Adam Stankiewicz
2017-09-27 19:57:29 +02:00
parent 9bfde7574a
commit 8b3418cab8
68 changed files with 1731 additions and 884 deletions

View File

@@ -36,9 +36,18 @@ endif
if !exists('g:haskell_indent_let')
" let x = 0 in
" >>>>x
"
" let x = 0
" y = 1
let g:haskell_indent_let = 4
endif
if !exists('g:haskell_indent_let_no_in')
" let x = 0
" x
let g:haskell_indent_let_no_in = 4
endif
if !exists('g:haskell_indent_where')
" where f :: Int -> Int
" >>>>>>f x = x
@@ -210,6 +219,9 @@ function! GetHaskellIndent()
"
" let x = 1
" >>>>y = 2
"
" let x = 1
" y 2
if l:prevline =~ '\C\<let\>\s\+.\+$'
if l:line =~ '\C^\s*\<let\>'
let l:s = match(l:prevline, '\C\<let\>')
@@ -221,11 +233,16 @@ function! GetHaskellIndent()
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
return l:s + g:haskell_indent_in
endif
else
elseif l:line =~ '\s=\s'
let l:s = match(l:prevline, '\C\<let\>')
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
return l:s + g:haskell_indent_let
endif
else
let l:s = match(l:prevline, '\C\<let\>')
if s:isSYN('haskellLet', v:lnum - 1, l:s + 1)
return l:s + g:haskell_indent_let_no_in
endif
endif
endif