fix(lsp): improve dynamic registration handling #37161

Work on #37166 

- Dynamic Registration Tracking via Provider
- Supports_Method
    - Multiple Registrations
    - RegistrationOptions may dictate support for a method
This commit is contained in:
Tristan Knight
2026-01-02 06:46:13 +00:00
committed by GitHub
parent a3c56d1002
commit ed562c296a
5 changed files with 202 additions and 43 deletions

View File

@@ -1299,4 +1299,64 @@ protocol._request_name_to_server_capability = {
}
-- stylua: ignore end
-- stylua: ignore start
-- Generated by gen_lsp.lua, keep at end of file.
--- Maps method names to the required client capability
protocol._request_name_allows_registration = {
['notebookDocument/didChange'] = true,
['notebookDocument/didClose'] = true,
['notebookDocument/didOpen'] = true,
['notebookDocument/didSave'] = true,
['textDocument/codeAction'] = true,
['textDocument/codeLens'] = true,
['textDocument/colorPresentation'] = true,
['textDocument/completion'] = true,
['textDocument/declaration'] = true,
['textDocument/definition'] = true,
['textDocument/diagnostic'] = true,
['textDocument/didChange'] = true,
['textDocument/didClose'] = true,
['textDocument/didOpen'] = true,
['textDocument/didSave'] = true,
['textDocument/documentColor'] = true,
['textDocument/documentHighlight'] = true,
['textDocument/documentLink'] = true,
['textDocument/documentSymbol'] = true,
['textDocument/foldingRange'] = true,
['textDocument/formatting'] = true,
['textDocument/hover'] = true,
['textDocument/implementation'] = true,
['textDocument/inlayHint'] = true,
['textDocument/inlineCompletion'] = true,
['textDocument/inlineValue'] = true,
['textDocument/linkedEditingRange'] = true,
['textDocument/moniker'] = true,
['textDocument/onTypeFormatting'] = true,
['textDocument/prepareCallHierarchy'] = true,
['textDocument/prepareTypeHierarchy'] = true,
['textDocument/rangeFormatting'] = true,
['textDocument/rangesFormatting'] = true,
['textDocument/references'] = true,
['textDocument/rename'] = true,
['textDocument/selectionRange'] = true,
['textDocument/semanticTokens/full'] = true,
['textDocument/semanticTokens/full/delta'] = true,
['textDocument/signatureHelp'] = true,
['textDocument/typeDefinition'] = true,
['textDocument/willSave'] = true,
['textDocument/willSaveWaitUntil'] = true,
['workspace/didChangeConfiguration'] = true,
['workspace/didChangeWatchedFiles'] = true,
['workspace/didCreateFiles'] = true,
['workspace/didDeleteFiles'] = true,
['workspace/didRenameFiles'] = true,
['workspace/executeCommand'] = true,
['workspace/symbol'] = true,
['workspace/textDocumentContent'] = true,
['workspace/willCreateFiles'] = true,
['workspace/willDeleteFiles'] = true,
['workspace/willRenameFiles'] = true,
}
-- stylua: ignore end
return protocol