From 25bda5a54a9c1d77014c246f45d6432c3d6ca8fa Mon Sep 17 00:00:00 2001 From: ndhuynh Date: Thu, 20 Oct 2022 00:54:32 -0400 Subject: [PATCH] Fix breaking changes from https://github.com/hrsh7th/cmp-nvim-lsp/issues/38 --- nvim/lua/config/lsp.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nvim/lua/config/lsp.lua b/nvim/lua/config/lsp.lua index 8e974d5..55153dc 100644 --- a/nvim/lua/config/lsp.lua +++ b/nvim/lua/config/lsp.lua @@ -24,15 +24,13 @@ local on_attach = function(_, bufnr) buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) buf_set_keymap('n', 'l', 'lua vim.diagnostic.open_float()', opts) buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', 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) buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) end -local capabilities = require('cmp_nvim_lsp').update_capabilities( - vim.lsp.protocol.make_client_capabilities()) - +local capabilities = require("cmp_nvim_lsp").default_capabilities() local default_opts = { on_attach = on_attach, capabilities = capabilities, @@ -68,7 +66,6 @@ end require("null-ls").setup({ sources = { - require("null-ls").builtins.formatting.black, require("null-ls").builtins.completion.spell, }, })