Skip to content

Commit 1eb077c

Browse files
committed
#73 fix indentation when pragmas and block comment occur
1 parent 7e85170 commit 1eb077c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/haskell.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ setlocal indentexpr=GetHaskellIndent()
6161
setlocal indentkeys=0{,0},0(,0),0[,0],!^F,o,O,0\=,0=where,0=let,0=deriving,<space>
6262

6363
function! s:isInBlock(hlstack)
64-
return index(a:hlstack, 'haskellParens') > -1 || index(a:hlstack, 'haskellBrackets') > -1 || index(a:hlstack, 'haskellBlock') > -1
64+
return index(a:hlstack, 'haskellParens') > -1 || index(a:hlstack, 'haskellBrackets') > -1 || index(a:hlstack, 'haskellBlock') > -1 || index(a:hlstack, 'haskellBlockComment') > -1 || index(a:hlstack, 'haskellPragma') > -1
6565
endfunction
6666

6767
function! s:getNesting(hlstack)
68-
return filter(a:hlstack, 'v:val == "haskellBlock" || v:val == "haskellBrackets" || v:val == "haskellParens"')
68+
return filter(a:hlstack, 'v:val == "haskellBlock" || v:val == "haskellBrackets" || v:val == "haskellParens" || v:val == "haskellBlockComment" || v:val == "haskellPragma" ')
6969
endfunction
7070

7171
function! s:getHLStack()

0 commit comments

Comments
 (0)