Skip to content

Commit a7423fe

Browse files
committed
trigger indentation in multi-line let expression (close #24)
1 parent 8d47143 commit a7423fe

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

indent/haskell.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Filename: indent/haskell.vim
33
" Author: itchyny
44
" License: MIT License
5-
" Last Change: 2023/11/06 08:17:59.
5+
" Last Change: 2023/11/07 19:40:39.
66
" =============================================================================
77

88
if exists('b:did_indent')
@@ -12,7 +12,7 @@ endif
1212
let b:did_indent = 1
1313

1414
setlocal indentexpr=GetHaskellIndent()
15-
setlocal indentkeys=!^F,o,O,=wher,=deri,0=in,0=class,0=instance,0=data,0=type,0=else,0<bar>,0},0],0(,0),0#,0,0==
15+
setlocal indentkeys=!^F,o,O,=wher,=deri,==,0=in,0=class,0=instance,0=data,0=type,0=else,0<bar>,0},0],0(,0),0#,0,0==
1616

1717
let s:save_cpo = &cpo
1818
set cpo&vim

test/do/where_do.in.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
z = x
2-
where f x = do
2+
where f x = do
33
print "hello"

test/function/function_eq_first.in.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
f :: Int -> Int
22
f 0
3-
= 1
3+
= 1
44
f x
5-
= x
5+
= x

test/function/where_function_eq_first.in.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ g = f
22
where
33
f :: Int -> Int
44
f 0
5-
= 1
5+
= 1
66
f x
7-
= x
7+
= x

test/let/let.in.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
f = let x = 0
2-
y = 1
2+
y = 1
33
in (x, y)

test/let/let_in_let_in.in.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
f = let x = 0
2-
y = 1
2+
y = 1
33
in let z = 2
4-
u = 3
4+
u = 3
55
in (x, y, z, u)

test/parenthesis/closed_binding.in.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
f x y z
2-
= [ x,
2+
= [ x,
33
y,
44
z ]
55
g x = x

0 commit comments

Comments
 (0)