Change formatting to async

This commit is contained in:
Evie Litherland-Smith 2023-01-09 15:29:31 +00:00
parent a5836620b9
commit 750489d242

View file

@ -40,7 +40,7 @@ local on_attach = function(client, bufnr)
-- Keep support for deprecated syntax in vim <= 7
if vim.version().minor <= 7 then
vim.keymap.set('n', '<leader>i', function()
vim.lsp.buf.formatting_sync({ timeout_ms = 10000 })
vim.lsp.buf.formatting()
end, bufopts)
else
vim.keymap.set('n', '<leader>i', function()