From 97f8fa8d41395e057dff5d15dffb133caab78a18 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 13 Jan 2023 21:42:51 +0100 Subject: update deprecated nvim lsp funcs --- neovim/.config/nvim/init.vim | 4 ++-- 1 file 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', 'e', 'lua vim.diagnostic.open_float()lua vim.diagnostic.goto_prev()', opts) vim.api.nvim_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) vim.api.nvim_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) -vim.api.nvim_set_keymap('v', '\\qf', 'lua vim.lsp.buf.range_formatting()', opts) +vim.api.nvim_set_keymap('v', '\\qf', 'lua vim.lsp.buf.format({ async = true })', 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', 'rn', 'lua vim.lsp.buf.rename()', opts) buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.format({ async = true })', opts) lsp_status.on_attach(client) end -- cgit v1.2.3