From 66bc018936c6ff76beb75f89d986af6442db4001 Mon Sep 17 00:00:00 2001 From: snowdroppe Date: Tue, 4 Feb 2025 01:43:07 +0000 Subject: fix(health.lua): increased version check cmd timeout (#3601) Problem: LspInfo returns '?' for version string when using the codeqlls language server. This is because codeql is slow to return its version number due to the underlying JVM. Solution: Increase the timeout from 300ms to 500ms. 1000 iterations of `codeql version` resulted in (349 +- 13) ms which informed the choice of 500ms. --- lua/lspconfig/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua index 64c584cf..7477dff7 100644 --- a/lua/lspconfig/health.lua +++ b/lua/lspconfig/health.lua @@ -51,7 +51,7 @@ local function try_get_cmd_output(cmd) on_stdout = on_data, on_stderr = on_data, }) - local rv = vim.fn.jobwait({ chanid }, 300) + local rv = vim.fn.jobwait({ chanid }, 500) vim.fn.jobstop(chanid) return rv[1] == 0 and out or nil end -- cgit v1.3.1