neovim: autosave rust source files

This commit is contained in:
LavaDesu 2021-09-12 21:02:58 +07:00
parent 851851f998
commit aac6406b9b
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -112,6 +112,10 @@
nmap <leader>rn <Plug>(coc-rename)
command! -nargs=0 Sw w !doas tee % > /dev/null
" autosave rust source files on change
au FileType rust inoremap <silent><esc> <esc>:update<cr>
au TextChanged,FocusLost,BufEnter *.rs silent update
" disable read-only warning
au BufEnter * set noro