From 5ad1c4be904d76e5ea7ee2773d0cc17ea1e94ef8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 26 Jun 2022 14:00:43 +0200 Subject: [PATCH] fixed deprecated format call --- lua/setup/lspinstall.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/setup/lspinstall.lua b/lua/setup/lspinstall.lua index 257b2c1..2d0e98e 100644 --- a/lua/setup/lspinstall.lua +++ b/lua/setup/lspinstall.lua @@ -62,7 +62,7 @@ local on_attach = function(client, bufnr) -- Set some keybinds conditional on server capabilities if client.server_capabilities.documentFormattingProvider then - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.format{async=true}', opts) end if client.server_capabilities.documentRangeFormattingProvider then buf_set_keymap('v', 'f', 'lua vim.lsp.buf.range_formatting()', opts)