about summary refs log tree commit diff
path: root/pkgs/aszlig/vim/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-04-23 20:03:39 +0200
committeraszlig <aszlig@nix.build>2018-04-23 20:03:39 +0200
commitbd329384c51e1831ca149136db8f8bfe9addbd45 (patch)
treed94048ef56612fde5e497b4852d882eea81e4c6f /pkgs/aszlig/vim/default.nix
parent45aab49b33ab2cd4c327b996d6924f104b038193 (diff)
pkgs/vim: Add a few exceptions for sleuth
This has annoyed me for a while now, especially when writing Haskell
code.

Let's say if I have something like this:

foo :: Num a => a -> a
foo a =
    b
  where
    b = a + 1

Sleuth will detect that the indentation level is 2 spaces, but in
reality what I want is to have it at 4 spaces. So turning off Sleuth
will solve that problem, especially because we can still invoke it
manually.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/vim/default.nix')
-rw-r--r--pkgs/aszlig/vim/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix
index be9d7c75..8c6a217e 100644
--- a/pkgs/aszlig/vim/default.nix
+++ b/pkgs/aszlig/vim/default.nix
@@ -358,6 +358,11 @@ let
     " Autocomplete/align Ledger lines after leaving insert mode
     au FileType ledger au InsertLeave * call ledger#autocomplete_and_align()
 
+    " Do not sleuth these file types!
+    au FileType ledger let g:sleuth_automatic = 0
+    au FileType haskell let g:sleuth_automatic = 0
+    au FileType nix let g:sleuth_automatic = 0
+
     " highlight unnecessary whitespace
     highlight ExtraWhitespace ctermbg=red guibg=red
     match ExtraWhitespace /\s\+$/