fix(lsp): handle nil root_dir in health check (#29010)

fix(lsp): handle nil root_dir in health check (#29007)

The root directory could show up as something like:

    Root directory: ~/path/to/cwd/v:null

Despite being `nil`

(cherry picked from commit f03b1622ad)

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-05-25 17:30:27 -05:00
committed by GitHub
parent 84d7bfcf16
commit 4efca7cda5
3 changed files with 6 additions and 4 deletions

View File

@@ -989,7 +989,7 @@ Lua module: vim.lsp.client *lsp-client*
if the client supports workspace folders. It
can be `null` if the client supports workspace
folders but none are configured.
• {root_dir} (`string`)
• {root_dir} (`string?`)
• {attached_buffers} (`table<integer,true>`)
• {commands} (`table<string,fun(command: lsp.Command, ctx: table)>`)
Table of command name to function which is