diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index e79a7ae..e0db1f0 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -54,7 +54,7 @@ local function run_healthcheck(section) end if not health_buf then - return { "Could not capture :checkhealth vim.lsp output" } + return { "Could not capture :checkhealth " .. section .. " output" } end -- Read lines @@ -67,6 +67,9 @@ local function run_healthcheck(section) end end + -- Close the buffer + vim.api.nvim_buf_delete(health_buf, { force = true }) + return lines end