diff options
| author | Gregory Anders <greg@gpanders.com> | 2025-05-20 12:05:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 12:05:20 -0500 |
| commit | 5ad01184f3c3cb4f100bbdcebee3dd699a69b0da (patch) | |
| tree | ac770b77d6d65e62bee5ee646764baadb2cc2036 /runtime/lua | |
| parent | 849e24f3cdb332616035422615b784e3bb476e35 (diff) | |
| download | rneovim-5ad01184f3c3cb4f100bbdcebee3dd699a69b0da.tar.gz rneovim-5ad01184f3c3cb4f100bbdcebee3dd699a69b0da.tar.bz2 rneovim-5ad01184f3c3cb4f100bbdcebee3dd699a69b0da.zip | |
fix(lsp/health): ensure valid table before concatenating (#34092)
The root_markers field can now contain a table of tables (as of
https://github.com/neovim/neovim/pull/33485) and :checkhealth will show
an error in that case since Lua cannot concatenate a table of tables.
Ensure that tables contain strings before concatenating and if not, fall
back to using vim.inspect().
Diffstat (limited to 'runtime/lua')
| -rw-r--r-- | runtime/lua/vim/lsp/health.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/health.lua b/runtime/lua/vim/lsp/health.lua index d99555537f..4578103261 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' then + elseif k == 'filetypes' or (k == 'root_markers' and type(v[1]) == 'string') then v_str = table.concat(v, ', ') elseif type(v) == 'function' then v_str = func_tostring(v) |