From 7a6623913f16ffc617a9033e968187c56c4eddc1 Mon Sep 17 00:00:00 2001 From: Michael Strobel Date: Mon, 17 Oct 2022 07:54:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20remove=20deprecated=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See: [hrsh7th/cmp-nvim-lsp#38](https://github.com/hrsh7th/cmp-nvim-lsp/issues/38#issuecomment-1279744539) --- lua/user/lsp/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/user/lsp/init.lua b/lua/user/lsp/init.lua index 5c9be69..81b9ba4 100644 --- a/lua/user/lsp/init.lua +++ b/lua/user/lsp/init.lua @@ -71,9 +71,11 @@ end ---get capabilities ---@return table function M.get_capabilities() - local capabilities = vim.lsp.protocol.make_client_capabilities() + local capabilities if PluginsOk "cmp_nvim_lsp" then - capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) + capabilities = require("cmp_nvim_lsp").default_capabilities() + else + capabilities = vim.lsp.protocol.make_client_capabilities() end return capabilities