@@ -55,10 +55,16 @@ local capabilities = {
55
55
56
56
M .capabilities = capabilities
57
57
58
+ --- @param dispatchers vim.lsp.rpc.Dispatchers
59
+ --- @return vim.lsp.rpc.PublicClient
58
60
M .start = function (dispatchers )
59
61
local message_id = 1
60
62
local stopped = false
61
63
64
+ --- @param method vim.lsp.protocol.Method | string LSP method name.
65
+ --- @param params table ? LSP request params.
66
+ --- @param callback fun ( err : lsp.ResponseError | nil , result : any )?
67
+ --- @param is_notify boolean ?
62
68
local function handle (method , params , callback , is_notify )
63
69
params = params or {}
64
70
callback = callback and vim .schedule_wrap (callback )
@@ -102,6 +108,10 @@ M.start = function(dispatchers)
102
108
return true , message_id
103
109
end
104
110
111
+ --- @param method vim.lsp.protocol.Method | string LSP method name.
112
+ --- @param params table ? LSP request params.
113
+ --- @param callback fun ( err : lsp.ResponseError | nil , result : any )
114
+ --- @param notify_callback fun ( message_id : integer )?
105
115
local function request (method , params , callback , notify_callback )
106
116
log :trace (" received LSP request for method " .. method )
107
117
@@ -118,6 +128,8 @@ M.start = function(dispatchers)
118
128
return success , message_id
119
129
end
120
130
131
+ --- @param method string LSP method name.
132
+ --- @param params table ? LSP request params.
121
133
local function notify (method , params )
122
134
if should_cache (method ) then
123
135
set_cache (params )
0 commit comments