feat(lsp): return resolved config for vim.lsp.config[name]

Allows to retrieve the configuration as it will be used by `lsp.enable`
- including the parts merged from `*` and rtp.

This is useful for explicit startup control
(`vim.lsp.start(vim.lsp.config[name])`)

Closes https://github.com/neovim/neovim/issues/31640
This commit is contained in:
Mathias Fussenegger
2024-12-29 13:44:42 +01:00
committed by Mathias Fußenegger
parent 1877cd5fcd
commit e00cd1ab40
3 changed files with 32 additions and 43 deletions

View File

@@ -6147,7 +6147,7 @@ describe('LSP', function()
vim.lsp.config('*', { root_markers = { '.git' } })
vim.lsp.config('foo', { cmd = { 'foo' } })
return vim.lsp._resolve_config('foo')
return vim.lsp.config['foo']
end)
)
end)