aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-10-29 09:36:02 +0000
committerLewis Russell <me@lewisr.dev>2024-11-01 09:17:39 +0000
commit9b357e30fdd0a575480182872331fdb87e9cc331 (patch)
tree02e7a8ce3fcd70946acca8e27d2769dfcf75b6e3 /runtime/lua/vim/lsp/protocol.lua
parentf54266dbed6f1a4cb4fad3486a722a25070d7feb (diff)
downloadrneovim-9b357e30fdd0a575480182872331fdb87e9cc331.tar.gz
rneovim-9b357e30fdd0a575480182872331fdb87e9cc331.tar.bz2
rneovim-9b357e30fdd0a575480182872331fdb87e9cc331.zip
feat(lsp)!: remove client-server handlers from vim.lsp.handlers
- Partition the handlers in vim.lsp.handlers as: - client to server response handlers (RCS) - server to client request handlers (RSC) - server to client notification handlers (NSC) Note use string indexes instead of protocol.methods for improved typing in LuaLS (tip: use hover on RCS, RSC or NSC).
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua104
1 files changed, 102 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index b299a8438f..98965d0e20 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -619,9 +619,109 @@ function protocol.resolve_capabilities(server_capabilities)
end
-- Generated by gen_lsp.lua, keep at end of file.
+--- @alias vim.lsp.protocol.Method.ClientToServer
+--- | 'callHierarchy/incomingCalls',
+--- | 'callHierarchy/outgoingCalls',
+--- | 'codeAction/resolve',
+--- | 'codeLens/resolve',
+--- | 'completionItem/resolve',
+--- | 'documentLink/resolve',
+--- | '$/setTrace',
+--- | 'exit',
+--- | 'initialize',
+--- | 'initialized',
+--- | 'inlayHint/resolve',
+--- | 'notebookDocument/didChange',
+--- | 'notebookDocument/didClose',
+--- | 'notebookDocument/didOpen',
+--- | 'notebookDocument/didSave',
+--- | 'shutdown',
+--- | 'textDocument/codeAction',
+--- | 'textDocument/codeLens',
+--- | 'textDocument/colorPresentation',
+--- | 'textDocument/completion',
+--- | 'textDocument/declaration',
+--- | 'textDocument/definition',
+--- | 'textDocument/diagnostic',
+--- | 'textDocument/didChange',
+--- | 'textDocument/didClose',
+--- | 'textDocument/didOpen',
+--- | 'textDocument/didSave',
+--- | 'textDocument/documentColor',
+--- | 'textDocument/documentHighlight',
+--- | 'textDocument/documentLink',
+--- | 'textDocument/documentSymbol',
+--- | 'textDocument/foldingRange',
+--- | 'textDocument/formatting',
+--- | 'textDocument/hover',
+--- | 'textDocument/implementation',
+--- | 'textDocument/inlayHint',
+--- | 'textDocument/inlineCompletion',
+--- | 'textDocument/inlineValue',
+--- | 'textDocument/linkedEditingRange',
+--- | 'textDocument/moniker',
+--- | 'textDocument/onTypeFormatting',
+--- | 'textDocument/prepareCallHierarchy',
+--- | 'textDocument/prepareRename',
+--- | 'textDocument/prepareTypeHierarchy',
+--- | 'textDocument/rangeFormatting',
+--- | 'textDocument/rangesFormatting',
+--- | 'textDocument/references',
+--- | 'textDocument/rename',
+--- | 'textDocument/selectionRange',
+--- | 'textDocument/semanticTokens/full',
+--- | 'textDocument/semanticTokens/full/delta',
+--- | 'textDocument/semanticTokens/range',
+--- | 'textDocument/signatureHelp',
+--- | 'textDocument/typeDefinition',
+--- | 'textDocument/willSave',
+--- | 'textDocument/willSaveWaitUntil',
+--- | 'typeHierarchy/subtypes',
+--- | 'typeHierarchy/supertypes',
+--- | 'window/workDoneProgress/cancel',
+--- | 'workspaceSymbol/resolve',
+--- | 'workspace/diagnostic',
+--- | 'workspace/didChangeConfiguration',
+--- | 'workspace/didChangeWatchedFiles',
+--- | 'workspace/didChangeWorkspaceFolders',
+--- | 'workspace/didCreateFiles',
+--- | 'workspace/didDeleteFiles',
+--- | 'workspace/didRenameFiles',
+--- | 'workspace/executeCommand',
+--- | 'workspace/symbol',
+--- | 'workspace/willCreateFiles',
+--- | 'workspace/willDeleteFiles',
+--- | 'workspace/willRenameFiles',
+
+--- @alias vim.lsp.protocol.Method.ServerToClient
+--- | 'client/registerCapability',
+--- | 'client/unregisterCapability',
+--- | '$/logTrace',
+--- | 'telemetry/event',
+--- | 'textDocument/publishDiagnostics',
+--- | 'window/logMessage',
+--- | 'window/showDocument',
+--- | 'window/showMessage',
+--- | 'window/showMessageRequest',
+--- | 'window/workDoneProgress/create',
+--- | 'workspace/applyEdit',
+--- | 'workspace/codeLens/refresh',
+--- | 'workspace/configuration',
+--- | 'workspace/diagnostic/refresh',
+--- | 'workspace/foldingRange/refresh',
+--- | 'workspace/inlayHint/refresh',
+--- | 'workspace/inlineValue/refresh',
+--- | 'workspace/semanticTokens/refresh',
+--- | 'workspace/workspaceFolders',
+
+--- @alias vim.lsp.protocol.Method
+--- | vim.lsp.protocol.Method.ClientToServer
+--- | 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
+--- @enum vim.lsp.protocol.Methods
+--- @see https://microsoft.github.io/language-server-protocol/specification/#metaModel
--- LSP method names.
protocol.Methods = {
--- A request to resolve the incoming calls for a given `CallHierarchyItem`.