vimrc: add augroup for lsp format sync

This commit is contained in:
surtur 2022-10-06 15:42:55 +02:00
parent a2c0d7247c
commit c91bc341ca
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -777,7 +777,10 @@ function! s:on_lsp_buffer_enabled() abort
" let g:lsp_format_sync_timeout = 1000
let g:lsp_format_sync_timeout = 700
augroup lsp_format_sync
autocmd!
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
augroup END
" refer to doc to add more commands
endfunction