From 13478e620a767df6f98241b951ae232482c2c1f2 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 29 Nov 2024 03:10:19 +0000 Subject: [PATCH] Neovim autoformat on save --- home-manager/modules/programs/neovim.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home-manager/modules/programs/neovim.nix b/home-manager/modules/programs/neovim.nix index 47bb213..cdfa403 100644 --- a/home-manager/modules/programs/neovim.nix +++ b/home-manager/modules/programs/neovim.nix @@ -20,7 +20,12 @@ let g:airline_theme='onehalflight' ''; } - vim-autoformat + { + plugin = vim-autoformat; + config = '' + au BufWrite * :Autoformat + ''; + } vim-surround ]; extraLuaConfig = ''