From 2f808daa78a2957af735637e558067d148ca2c3d Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Tue, 16 Nov 2021 10:43:28 +1000 Subject: [PATCH] neovim: added Neoformat --- profiles/neovim.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/profiles/neovim.nix b/profiles/neovim.nix index 6fb9116..1d5110a 100644 --- a/profiles/neovim.nix +++ b/profiles/neovim.nix @@ -15,9 +15,11 @@ haskell-vim # Syntax Highlighting and Indentation for Haskell indentLine # Display thin vertical lines at each indentation level neocomplete-vim # Keyword completion system + neoformat # A (Neo)vim plugin for formatting code. nerdcommenter # Comment functions so powerful—no comment necessary nerdtree # File system explorer nerdtree-git-plugin # Plugin for nerdtree showing git status + #statix # Lints and suggestions for the nix programming language supertab # Allows you to use for all your insert completion syntastic # Syntax checking hacks vim-addon-nix # Scripts assisting writing .nix files @@ -126,6 +128,12 @@ autocmd BufWritePost,FileWritePost *.gpg u augroup END + " Use Neoformat to automatically format files + augroup fmt + autocmd! + autocmd BufWritePre * undojoin | Neoformat + augroup END + " Manage ISO files augroup iso au!