From 150513a163d352b8e33985fdfaa0547ec7f2df9e Mon Sep 17 00:00:00 2001 From: Oskar Haarklou Veileborg Date: Thu, 19 Jun 2025 12:35:13 +0200 Subject: [PATCH] fix(lsp) type annotation for `vim.lsp.Config.cmd` #34574 The type annotation for `vim.lsp.ClientConfig.cmd` was changed, but the update was not propagated to `vim.lsp.Config`. --- runtime/doc/lsp.txt | 2 +- runtime/lua/vim/lsp.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 211e1253eb..3456d33e05 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -716,7 +716,7 @@ Lua module: vim.lsp *lsp-core* Fields: ~ - • {cmd}? (`string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) + • {cmd}? (`string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers, config: vim.lsp.ClientConfig): vim.lsp.rpc.PublicClient`) See `cmd` in |vim.lsp.ClientConfig|. See also `reuse_client` to dynamically decide (per-buffer) when `cmd` should be re-invoked. diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 859573cb36..6924fe5b82 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -273,7 +273,7 @@ end --- --- See `cmd` in [vim.lsp.ClientConfig]. --- See also `reuse_client` to dynamically decide (per-buffer) when `cmd` should be re-invoked. ---- @field cmd? string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient +--- @field cmd? string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers, config: vim.lsp.ClientConfig): vim.lsp.rpc.PublicClient --- --- Filetypes the client will attach to, if activated by `vim.lsp.enable()`. If not provided, the --- client will attach to all filetypes.