mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(lsp): access correct client capability path in supports_registration
				
					
				
			This commit is contained in:
		@@ -840,7 +840,8 @@ 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 = vim.tbl_get(self.capabilities, unpack(vim.split(method, '/')))
 | 
					  local capability_path = lsp.protocol._request_name_to_client_capability[method]
 | 
				
			||||||
 | 
					  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