aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-23 08:20:19 -0800
committerGitHub <noreply@github.com>2025-02-23 08:20:19 -0800
commit9304a417af9998a8164c2b66d6033f9586d36c56 (patch)
tree0ee67cbcf8e165cabdd28a58f0621d2444664b76 /runtime/lua/vim/lsp/protocol.lua
parent0c9c140f91c97dfacf8648a5fee90b06d8c50bbc (diff)
parente4c1f6667b146cfe33df49e5c5984d4d303c5aec (diff)
downloadrneovim-9304a417af9998a8164c2b66d6033f9586d36c56.tar.gz
rneovim-9304a417af9998a8164c2b66d6033f9586d36c56.tar.bz2
rneovim-9304a417af9998a8164c2b66d6033f9586d36c56.zip
Merge #32503 feat(lsp): use the meta model to generate server capability map
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua77
1 files changed, 76 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 33d029420b..7975006f9d 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -693,6 +693,7 @@ end
--- | 'workspace/didRenameFiles',
--- | 'workspace/executeCommand',
--- | 'workspace/symbol',
+--- | 'workspace/textDocumentContent',
--- | 'workspace/willCreateFiles',
--- | 'workspace/willDeleteFiles',
--- | 'workspace/willRenameFiles',
@@ -716,6 +717,7 @@ end
--- | 'workspace/inlayHint/refresh',
--- | 'workspace/inlineValue/refresh',
--- | 'workspace/semanticTokens/refresh',
+--- | 'workspace/textDocumentContent/refresh',
--- | 'workspace/workspaceFolders',
--- @alias vim.lsp.protocol.Method
@@ -723,7 +725,6 @@ end
--- | vim.lsp.protocol.Method.ServerToClient
-- Generated by gen_lsp.lua, keep at end of file.
----
--- @enum vim.lsp.protocol.Methods
--- @see https://microsoft.github.io/language-server-protocol/specification/#metaModel
--- LSP method names.
@@ -1049,6 +1050,16 @@ protocol.Methods = {
--- need to advertise support for WorkspaceSymbols via the client capability
--- `workspace.symbol.resolveSupport`.
workspace_symbol = 'workspace/symbol',
+ --- The `workspace/textDocumentContent` request is sent from the client to the
+ --- server to request the content of a text document.
+ --- @since 3.18.0
+ --- @proposed
+ workspace_textDocumentContent = 'workspace/textDocumentContent',
+ --- The `workspace/textDocumentContent` request is sent from the server to the client to refresh
+ --- the content of a specific text document.
+ --- @since 3.18.0
+ --- @proposed
+ workspace_textDocumentContent_refresh = 'workspace/textDocumentContent/refresh',
--- The will create files request is sent from the client to the server before files are actually
--- created as long as the creation is triggered from within the client.
--- The request can return a `WorkspaceEdit` which will be applied to workspace before the
@@ -1068,4 +1079,68 @@ protocol.Methods = {
workspace_workspaceFolders = 'workspace/workspaceFolders',
}
+-- stylua: ignore start
+-- Generated by gen_lsp.lua, keep at end of file.
+--- Maps method names to the required server capability
+protocol._request_name_to_capability = {
+ ['codeAction/resolve'] = { 'codeActionProvider', 'resolveProvider' },
+ ['codeLens/resolve'] = { 'codeLensProvider', 'resolveProvider' },
+ ['completionItem/resolve'] = { 'completionProvider', 'resolveProvider' },
+ ['documentLink/resolve'] = { 'documentLinkProvider', 'resolveProvider' },
+ ['inlayHint/resolve'] = { 'inlayHintProvider', 'resolveProvider' },
+ ['textDocument/codeAction'] = { 'codeActionProvider' },
+ ['textDocument/codeLens'] = { 'codeLensProvider' },
+ ['textDocument/completion'] = { 'completionProvider' },
+ ['textDocument/declaration'] = { 'declarationProvider' },
+ ['textDocument/definition'] = { 'definitionProvider' },
+ ['textDocument/diagnostic'] = { 'diagnosticProvider' },
+ ['textDocument/didChange'] = { 'textDocumentSync' },
+ ['textDocument/didClose'] = { 'textDocumentSync', 'openClose' },
+ ['textDocument/didOpen'] = { 'textDocumentSync', 'openClose' },
+ ['textDocument/didSave'] = { 'textDocumentSync', 'save' },
+ ['textDocument/documentColor'] = { 'colorProvider' },
+ ['textDocument/documentHighlight'] = { 'documentHighlightProvider' },
+ ['textDocument/documentLink'] = { 'documentLinkProvider' },
+ ['textDocument/documentSymbol'] = { 'documentSymbolProvider' },
+ ['textDocument/foldingRange'] = { 'foldingRangeProvider' },
+ ['textDocument/formatting'] = { 'documentFormattingProvider' },
+ ['textDocument/hover'] = { 'hoverProvider' },
+ ['textDocument/implementation'] = { 'implementationProvider' },
+ ['textDocument/inlayHint'] = { 'inlayHintProvider' },
+ ['textDocument/inlineCompletion'] = { 'inlineCompletionProvider' },
+ ['textDocument/inlineValue'] = { 'inlineValueProvider' },
+ ['textDocument/linkedEditingRange'] = { 'linkedEditingRangeProvider' },
+ ['textDocument/moniker'] = { 'monikerProvider' },
+ ['textDocument/onTypeFormatting'] = { 'documentOnTypeFormattingProvider' },
+ ['textDocument/prepareCallHierarchy'] = { 'callHierarchyProvider' },
+ ['textDocument/prepareRename'] = { 'renameProvider', 'prepareProvider' },
+ ['textDocument/prepareTypeHierarchy'] = { 'typeHierarchyProvider' },
+ ['textDocument/rangeFormatting'] = { 'documentRangeFormattingProvider' },
+ ['textDocument/rangesFormatting'] = { 'documentRangeFormattingProvider', 'rangesSupport' },
+ ['textDocument/references'] = { 'referencesProvider' },
+ ['textDocument/rename'] = { 'renameProvider' },
+ ['textDocument/selectionRange'] = { 'selectionRangeProvider' },
+ ['textDocument/semanticTokens/full'] = { 'semanticTokensProvider' },
+ ['textDocument/semanticTokens/full/delta'] = { 'semanticTokensProvider', 'full', 'delta' },
+ ['textDocument/semanticTokens/range'] = { 'semanticTokensProvider', 'range' },
+ ['textDocument/signatureHelp'] = { 'signatureHelpProvider' },
+ ['textDocument/typeDefinition'] = { 'typeDefinitionProvider' },
+ ['textDocument/willSave'] = { 'textDocumentSync', 'willSave' },
+ ['textDocument/willSaveWaitUntil'] = { 'textDocumentSync', 'willSaveWaitUntil' },
+ ['workspaceSymbol/resolve'] = { 'workspaceSymbolProvider', 'resolveProvider' },
+ ['workspace/diagnostic'] = { 'diagnosticProvider', 'workspaceDiagnostics' },
+ ['workspace/didChangeWorkspaceFolders'] = { 'workspace', 'workspaceFolders', 'changeNotifications' },
+ ['workspace/didCreateFiles'] = { 'workspace', 'fileOperations', 'didCreate' },
+ ['workspace/didDeleteFiles'] = { 'workspace', 'fileOperations', 'didDelete' },
+ ['workspace/didRenameFiles'] = { 'workspace', 'fileOperations', 'didRename' },
+ ['workspace/executeCommand'] = { 'executeCommandProvider' },
+ ['workspace/symbol'] = { 'workspaceSymbolProvider' },
+ ['workspace/textDocumentContent'] = { 'workspace', 'textDocumentContent' },
+ ['workspace/willCreateFiles'] = { 'workspace', 'fileOperations', 'willCreate' },
+ ['workspace/willDeleteFiles'] = { 'workspace', 'fileOperations', 'willDelete' },
+ ['workspace/willRenameFiles'] = { 'workspace', 'fileOperations', 'willRename' },
+ ['workspace/workspaceFolders'] = { 'workspace', 'workspaceFolders' },
+}
+-- stylua: ignore end
+
return protocol