diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-01-13 21:42:51 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-01-13 21:47:18 +0100 |
commit | 97f8fa8d41395e057dff5d15dffb133caab78a18 (patch) | |
tree | 1fa106d5461b0d1efca5a3491a388aa7de559fa4 | |
parent | 90e53fbfca3e8f17d4477e328af0977401846e02 (diff) | |
download | dotfiles-97f8fa8d41395e057dff5d15dffb133caab78a18.tar.gz dotfiles-97f8fa8d41395e057dff5d15dffb133caab78a18.tar.bz2 dotfiles-97f8fa8d41395e057dff5d15dffb133caab78a18.zip |
update deprecated nvim lsp funcs
-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 |