fix(lsp): auto format, sane default for timeout

This commit is contained in:
Matt Leong 2021-10-25 12:01:31 -07:00
parent 9366f6072c
commit ae48287cf7

View file

@ -25,7 +25,7 @@ function M.on_attach(client, bufnr)
else
format_filetypes = '*'
end
vim.cmd(string.format('autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 1000)', format_filetypes))
vim.cmd(string.format('autocmd BufWritePre %s lua vim.lsp.buf.formatting_sync(nil, 200)', format_filetypes))
end
else
client.resolved_capabilities.document_formatting = false