mirror of
https://github.com/neovim/neovim.git
synced 2025-10-11 12:26:37 +00:00
fix(lsp): use LSP method type in more places (#36069)
This commit is contained in:
@@ -115,7 +115,7 @@ end
|
||||
local default_dispatchers = {
|
||||
--- Default dispatcher for notifications sent to an LSP server.
|
||||
---
|
||||
---@param method string The invoked LSP method
|
||||
---@param method vim.lsp.protocol.Method The invoked LSP method
|
||||
---@param params table Parameters for the invoked LSP method
|
||||
notification = function(method, params)
|
||||
log.debug('notification', method, params)
|
||||
@@ -123,7 +123,7 @@ local default_dispatchers = {
|
||||
|
||||
--- Default dispatcher for requests sent to an LSP server.
|
||||
---
|
||||
---@param method string The invoked LSP method
|
||||
---@param method vim.lsp.protocol.Method The invoked LSP method
|
||||
---@param params table Parameters for the invoked LSP method
|
||||
---@return any result (always nil for the default dispatchers)
|
||||
---@return lsp.ResponseError error `vim.lsp.protocol.ErrorCodes.MethodNotFound`
|
||||
@@ -226,7 +226,7 @@ end
|
||||
|
||||
---@package
|
||||
--- Sends a notification to the LSP server.
|
||||
---@param method string The invoked LSP method
|
||||
---@param method vim.lsp.protocol.Method The invoked LSP method
|
||||
---@param params any Parameters for the invoked LSP method
|
||||
---@return boolean `true` if notification could be sent, `false` if not
|
||||
function Client:notify(method, params)
|
||||
@@ -251,7 +251,7 @@ end
|
||||
---@package
|
||||
--- Sends a request to the LSP server and runs {callback} upon response. |vim.lsp.rpc.request()|
|
||||
---
|
||||
---@param method string The invoked LSP method
|
||||
---@param method vim.lsp.protocol.Method The invoked LSP method
|
||||
---@param params table? Parameters for the invoked LSP method
|
||||
---@param callback fun(err?: lsp.ResponseError, result: any) Callback to invoke
|
||||
---@param notify_reply_callback? fun(message_id: integer) Callback to invoke as soon as a request is no longer pending
|
||||
|
Reference in New Issue
Block a user