mirror of
https://github.com/neovim/neovim.git
synced 2026-11-02 20:30:40 -06:00
fix(lsp): allow specifying bufnr + client_id filter when enabling capabilities #37690
Today there is a constraint that these arguments to the enable filter be mutually exclusive, but I do not know why such a constraint exists (it is perfectly reasonable to want to enable a capabilility for just one buffer and just one client).
This commit is contained in:
1 parent
24cdc44902
commit
ed267268b8
1 file changed
-1
@@ -124,7 +124,6 @@ function M.enable(name, enable, filter)
|
||||
filter = filter or {}
|
||||
local bufnr = filter.bufnr and vim._resolve_bufnr(filter.bufnr)
|
||||
local client_id = filter.client_id
|
||||
assert(not (bufnr and client_id), '`bufnr` and `client_id` are mutually exclusive.')
|
||||
|
||||
local var = make_enable_var(name)
|
||||
local client = client_id and vim.lsp.get_client_by_id(client_id)
|
||||
|
||||
Reference in new issue
Block a user