From a2f68aef8545274296e289e1ba9751103d368989 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 10 Oct 2022 23:02:18 +0200 Subject: vim-dev: changes due to Neovim 0.8 --- dotfiles/vim-dev.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dotfiles/vim-dev.lua b/dotfiles/vim-dev.lua index dc8cf9f..7cf2bd3 100644 --- a/dotfiles/vim-dev.lua +++ b/dotfiles/vim-dev.lua @@ -30,12 +30,9 @@ local function on_attach(client, bufnr) -- Capability specific - if client.resolved_capabilities.document_formatting then + if client.server_capabilities.documentFormattingProvider then vim.keymap.set("n", "sf", vim.lsp.buf.formatting, desc(opts, "Format buffer")) end - if client.resolved_capabilities.document_range_formatting then - vim.keymap.set("v", "sf", vim.lsp.buf.range_formatting, desc(opts, "Format Range")) - end -- Rust specific vim.keymap.set("n", "sh", "RustToggleInlayHints", opts) -- cgit v1.2.3