Skip to content

Commit 7b2664d

Browse files
committed
Add stylish-haskell
1 parent b70d4b0 commit 7b2664d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.vimrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ noremap ,, ,
2727
" Use par for prettier line formatting
2828
set formatprg="PARINIT='rTbgqR B=.,?_A_a Q=_s>|' par\ -w72"
2929

30+
" Use stylish haskell instead of par for haskell buffers
31+
autocmd FileType haskell let &formatprg="stylish-haskell"
32+
3033
" Find custom built ghc-mod, codex etc
3134
let $PATH = $PATH . ':' . expand("~/.haskell-vim-now/bin")
3235

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ selections to it. This works well for evaluating things in GHCI.
285285
<tr>
286286
<td>jk</td><td>Exit Insert mode without straining your hand</td>
287287
</tr>
288+
<tr>
289+
<td>gq</td><td>Format selection using `stylish-haskell` for haskell buffers (`par` for others)</td>
290+
</tr>
288291
</tbody>
289292
</table>
290293

install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ build_shared_binary "hscope"
117117
build_shared_binary "pointfree"
118118
build_shared_binary "pointful"
119119
build_shared_binary "hoogle"
120+
build_shared_binary "stylish-haskell"
120121

121122
msg "Building Hoogle database..."
122123
$endpath/bin/hoogle data

0 commit comments

Comments
 (0)