Go back to only format on save for rust and go

This commit is contained in:
ViViDboarder 2021-09-09 16:09:38 -07:00
parent da356bba97
commit 098ef45271
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ local function default_attach(client, bufnr)
vim.cmd([[
augroup lsp_format
autocmd!
" autocmd BufWritePre *.rs,*.go lua vim.lsp.buf.formatting_sync(nil, 1000)
autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync(nil, 1000)
autocmd BufWritePre *.rs,*.go lua vim.lsp.buf.formatting_sync(nil, 1000)
" autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync(nil, 1000)
augroup END
]])
elseif client.resolved_capabilities.document_range_formatting then