mirror of
https://github.com/neovim/neovim.git
synced 2026-08-01 05:09:08 +00: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).
(cherry picked from commit ed267268b8)
This commit is contained in:
committed by
github-actions[bot]
parent
5ff4e147d0
commit
5c38490806
@@ -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