From 8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 19:57:29 +0200 Subject: Update --- indent/haskell.vim | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indent/haskell.vim') diff --git a/indent/haskell.vim b/indent/haskell.vim index e63515ce..5c33e550 100644 --- a/indent/haskell.vim +++ b/indent/haskell.vim @@ -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\\s\+.\+$' if l:line =~ '\C^\s*\' let l:s = match(l:prevline, '\C\') @@ -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\') 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\') + if s:isSYN('haskellLet', v:lnum - 1, l:s + 1) + return l:s + g:haskell_indent_let_no_in + endif endif endif -- cgit v1.2.3