From 9261aef2f30d9a5043cdd991d8edf71b89f7368d Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Thu, 26 Jun 2025 10:22:45 -0500 Subject: [PATCH] fix(lsp/health): always use vim.inspect to show root_markers (#34667) In https://github.com/neovim/neovim/pull/34092 we changed the healthcheck to display root markers as a concatenated list if the first item in root_markers is a string (not a table). However, this does not solve the general case, because root_markers can contain a string as the first element, but a table as the 2nd element. Because root_markers has a more complex structure we should always just display it using vim.inspect, rather than adding a special case for when all items are a string. (cherry picked from commit f0c0c24ed77738a1792c0d499c300a4fb2984d02) --- runtime/lua/vim/lsp/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lua/vim/lsp/health.lua b/runtime/lua/vim/lsp/health.lua index 4578103261..1d8d0e8e88 100644 --- a/runtime/lua/vim/lsp/health.lua +++ b/runtime/lua/vim/lsp/health.lua @@ -198,7 +198,7 @@ local function check_enabled_configs() local v_str --- @type string? if k == 'name' then v_str = nil - elseif k == 'filetypes' or (k == 'root_markers' and type(v[1]) == 'string') then + elseif k == 'filetypes' then v_str = table.concat(v, ', ') elseif type(v) == 'function' then v_str = func_tostring(v)