mirror of
https://github.com/neovim/neovim.git
synced 2026-04-28 18:24:13 +00:00
refactor(lsp): unify capability checks and registration #36781
Problem: Our LSP type system didnt have a concept of RegistrationMethods, this is where the method to dynamically register for a capability is sent to a different method endpoint then is used to call it. Eg `textDocument/semanticTokens` rather than the specific full/range/delta methods Solution: Extended generator to create `vim.lsp.protocol.Methods.Registration` with these registration methods. Also extend `_request_name_to_client_capability` to cover these methods. Adjust typing to suit
This commit is contained in:
@@ -21,7 +21,7 @@ local all_capabilities = {}
|
||||
---@field name vim.lsp.capability.Name
|
||||
---
|
||||
--- Static field records the method this capability requires.
|
||||
---@field method vim.lsp.protocol.Method.ClientToServer
|
||||
---@field method vim.lsp.protocol.Method.ClientToServer | vim.lsp.protocol.Method.Registration
|
||||
---
|
||||
--- Static field for retrieving the instance associated with a specific `bufnr`.
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user