From 97b2b8ed3cddf8674bd65382f0a56931a70b0d51 Mon Sep 17 00:00:00 2001 From: vulns-are-features-too <57666296+vulns-are-features-too@users.noreply.github.com> Date: Sat, 27 Sep 2025 11:16:45 +0700 Subject: [PATCH] chore: update docs to use vim.lsp.config instead of require('lspconfig') https://github.com/neovim/nvim-lspconfig/pull/4077 --- README.md | 4 ++-- doc/cmp-nvim-lsp.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dba8c53..3ef9667 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,10 @@ require'cmp'.setup { local capabilities = require('cmp_nvim_lsp').default_capabilities() -- An example for configuring `clangd` LSP to use nvim-cmp as a completion engine -require('lspconfig').clangd.setup { +vim.lsp.config('clangd', { capabilities = capabilities, ... -- other lspconfig configs -} +}) ``` ## Option diff --git a/doc/cmp-nvim-lsp.txt b/doc/cmp-nvim-lsp.txt index 28e3700..b2ea141 100644 --- a/doc/cmp-nvim-lsp.txt +++ b/doc/cmp-nvim-lsp.txt @@ -15,11 +15,11 @@ How to disable specific LSP server's cmpletion?~ You can disable specific LSP server's cmpletion by adding the following > - require('lspconfig')[%YOUR_LSP_SERVER%].setup { + vim.lsp.config([%YOUR_LSP_SERVER%], { on_attach = function(client) client.server_capabilities.completionProvider = false end - } + }) <