mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
fix(lsp): add vim.deprecate call to vim.lsp.with (#37960)
This commit is contained in:
@@ -1570,6 +1570,11 @@ end
|
|||||||
---@param handler (lsp.Handler) See |lsp-handler|
|
---@param handler (lsp.Handler) See |lsp-handler|
|
||||||
---@param override_config (table) Table containing the keys to override behavior of the {handler}
|
---@param override_config (table) Table containing the keys to override behavior of the {handler}
|
||||||
function lsp.with(handler, override_config)
|
function lsp.with(handler, override_config)
|
||||||
|
vim.deprecate(
|
||||||
|
'vim.lsp.with()',
|
||||||
|
'Pass the configuration to equivalent functions in `vim.lsp.buf`',
|
||||||
|
'0.12'
|
||||||
|
)
|
||||||
return function(err, result, ctx, config)
|
return function(err, result, ctx, config)
|
||||||
return handler(err, result, ctx, vim.tbl_deep_extend('force', config or {}, override_config))
|
return handler(err, result, ctx, vim.tbl_deep_extend('force', config or {}, override_config))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user