aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2025-02-17 17:53:12 -0800
committerMaria José Solano <majosolano99@gmail.com>2025-02-21 08:40:33 -0800
commite4c1f6667b146cfe33df49e5c5984d4d303c5aec (patch)
treed4c31bc36edfd12507047ae6e905702cd7c7a8ee /runtime/lua/vim/lsp/protocol.lua
parentae2fd91b411df58b68eb06534e825e7cb8e1fdd7 (diff)
downloadrneovim-e4c1f6667b146cfe33df49e5c5984d4d303c5aec.tar.gz
rneovim-e4c1f6667b146cfe33df49e5c5984d4d303c5aec.tar.bz2
rneovim-e4c1f6667b146cfe33df49e5c5984d4d303c5aec.zip
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.lua65
1 files changed, 64 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 6895098126..7975006f9d 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -725,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.
@@ -1080,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