From f21c60790bf0b32ddfabd287a87cafb5e8702252 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Wed, 29 Jan 2020 20:03:21 -0600 Subject: [PATCH] format with ormolu where possible --- dotfiles/kakoune.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dotfiles/kakoune.nix b/dotfiles/kakoune.nix index ebd6db8..789d3bf 100644 --- a/dotfiles/kakoune.nix +++ b/dotfiles/kakoune.nix @@ -128,6 +128,24 @@ in { option = ".*.elm"; } + # Haskell + { + name = "WinCreate"; + option = ".*.hs"; + commands = '' + evaluate-commands %sh{ + if which ormolu > /dev/null; then + echo 'set-option buffer formatcmd ormolu' + fi + } + ''; + } + { + commands = "format"; + name = "BufWritePre"; + option = ".*.hs"; + } + # Indents { name = "WinCreate";