mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
feat(lsp): pass resolved config to cmd() #34550
Problem: In LSP configs, the function form of `cmd()` cannot easily get the resolved root dir (workspace). One of the main use-cases of a dynamic `cmd()` is to be able to start a new server whose binary may be located *in the workspace* ([example](https://github.com/neovim/nvim-lspconfig/pull/3912)). Compare `reuse_client()`, which also receives the resolved config. Solution: Pass the resolved config to `cmd()`. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ M.create_server_definition = function()
|
||||
local server = {}
|
||||
server.messages = {}
|
||||
|
||||
function server.cmd(dispatchers)
|
||||
function server.cmd(dispatchers, _config)
|
||||
local closing = false
|
||||
local handlers = opts.handlers or {}
|
||||
local srv = {}
|
||||
|
||||
Reference in New Issue
Block a user