From a7bbda121d035d050b449b4dc63bd6ae027e248d Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 25 Mar 2024 19:06:28 +0000 Subject: fix(test): typing --- test/functional/plugin/lsp/helpers.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/functional/plugin/lsp') diff --git a/test/functional/plugin/lsp/helpers.lua b/test/functional/plugin/lsp/helpers.lua index 97fa108500..376de66c51 100644 --- a/test/functional/plugin/lsp/helpers.lua +++ b/test/functional/plugin/lsp/helpers.lua @@ -128,6 +128,18 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options, settings) ) end +--- @class test.lsp.Config +--- @field test_name string +--- @field timeout_ms? integer +--- @field options? table +--- @field settings? table +--- +--- @field on_setup? fun() +--- @field on_init? fun(client: vim.lsp.Client, ...) +--- @field on_handler? fun(...) +--- @field on_exit? fun(code: integer, signal: integer) + +--- @param config test.lsp.Config function M.test_rpc_server(config) if config.test_name then M.clear_notrace() @@ -158,6 +170,7 @@ function M.test_rpc_server(config) end end, }) + --- @type integer, integer local code, signal local function on_request(method, args) if method == 'init' then -- cgit