diff options
-rw-r--r-- | neovim/.config/nvim/init.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 3ca0feb..5bfc14d 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -207,7 +207,7 @@ vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<C vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts) vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts) vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts) -vim.api.nvim_set_keymap('v', '\\qf', '<ESC><cmd>lua vim.lsp.buf.range_formatting()<CR>', opts) +vim.api.nvim_set_keymap('v', '\\qf', '<ESC><cmd>lua vim.lsp.buf.format({ async = true })<CR>', opts) -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer @@ -232,7 +232,7 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) - buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) + buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format({ async = true })<CR>', opts) lsp_status.on_attach(client) end |