diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 07c38ef..3966e0b 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -60,6 +60,10 @@ in { autocmd BufNewFile,BufRead *.ecr setlocal syntax=html autocmd BufWritePre,FileWritePre * silent! call mkdir(expand(':p:h'), 'p') + augroup cdgit + autocmd! + autocmd VimEnter * silent! :cd `git rev-parse --show-toplevel` + augroup END ''; plugins = with pkgs.vimPlugins; [ {