From bd329384c51e1831ca149136db8f8bfe9addbd45 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 23 Apr 2018 20:03:39 +0200 Subject: 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 --- pkgs/aszlig/vim/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs') 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\+$/ -- cgit 1.4.1