From aac6406b9b907b6c57ab8695bd1b5a1a90fb8c26 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Sun, 12 Sep 2021 21:02:58 +0700 Subject: [PATCH] neovim: autosave rust source files --- modules/user/neovim.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/user/neovim.nix b/modules/user/neovim.nix index f6617ba..a1705fa 100644 --- a/modules/user/neovim.nix +++ b/modules/user/neovim.nix @@ -112,6 +112,10 @@ nmap rn (coc-rename) command! -nargs=0 Sw w !doas tee % > /dev/null + " autosave rust source files on change + au FileType rust inoremap :update + au TextChanged,FocusLost,BufEnter *.rs silent update + " disable read-only warning au BufEnter * set noro