diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-05 17:17:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 17:17:35 -0700 |
| commit | 96cfcfde42ebfbd5e1d40da305d2ba460a852b27 (patch) | |
| tree | ea81642f49cf99b5b19a5fd09c521e9a069a90ca /lua/lspconfig/configs/clangd.lua | |
| parent | docs: cleanup #3696 (diff) | |
| download | nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar.gz nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar.bz2 nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar.lz nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar.xz nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.tar.zst nvim-lspconfig-96cfcfde42ebfbd5e1d40da305d2ba460a852b27.zip | |
refactor: deprecate get_active_client_by_name #3697
Diffstat (limited to 'lua/lspconfig/configs/clangd.lua')
| -rw-r--r-- | lua/lspconfig/configs/clangd.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/configs/clangd.lua b/lua/lspconfig/configs/clangd.lua index ebacbcb9..ba60ecde 100644 --- a/lua/lspconfig/configs/clangd.lua +++ b/lua/lspconfig/configs/clangd.lua @@ -4,7 +4,7 @@ local util = require 'lspconfig.util' local function switch_source_header(bufnr) local method_name = 'textDocument/switchSourceHeader' bufnr = util.validate_bufnr(bufnr) - local client = util.get_active_client_by_name(bufnr, 'clangd') + local client = vim.lsp.get_clients({ bufnr = bufnr, name = 'clangd' })[1] if not client then return vim.notify(('method %s is not supported by any servers active on the current buffer'):format(method_name)) end @@ -23,7 +23,7 @@ end local function symbol_info() local bufnr = vim.api.nvim_get_current_buf() - local clangd_client = util.get_active_client_by_name(bufnr, 'clangd') + local clangd_client = vim.lsp.get_clients({ bufnr = bufnr, name = 'clangd' })[1] if not clangd_client or not clangd_client.supports_method 'textDocument/symbolInfo' then return vim.notify('Clangd client not found', vim.log.levels.ERROR) end |
