mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(lsp): fallback to empty capability_path
in supports_registration
This commit is contained in:

committed by
Lewis Russell

parent
181df60533
commit
82b844fefe
@@ -840,7 +840,7 @@ end
|
|||||||
--- Get options for a method that is registered dynamically.
|
--- Get options for a method that is registered dynamically.
|
||||||
--- @param method vim.lsp.protocol.Method
|
--- @param method vim.lsp.protocol.Method
|
||||||
function Client:_supports_registration(method)
|
function Client:_supports_registration(method)
|
||||||
local capability_path = lsp.protocol._request_name_to_client_capability[method]
|
local capability_path = lsp.protocol._request_name_to_client_capability[method] or {}
|
||||||
local capability = vim.tbl_get(self.capabilities, unpack(capability_path))
|
local capability = vim.tbl_get(self.capabilities, unpack(capability_path))
|
||||||
return type(capability) == 'table' and capability.dynamicRegistration
|
return type(capability) == 'table' and capability.dynamicRegistration
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user