mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 21:30:34 +00:00
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:
committed by
GitHub
parent
84d7bfcf16
commit
4efca7cda5
@@ -41,7 +41,10 @@ local function check_active_clients()
|
||||
end
|
||||
report_info(table.concat({
|
||||
string.format('%s (id: %d)', client.name, client.id),
|
||||
string.format(' Root directory: %s', vim.fn.fnamemodify(client.root_dir, ':~')),
|
||||
string.format(
|
||||
' Root directory: %s',
|
||||
client.root_dir and vim.fn.fnamemodify(client.root_dir, ':~') or nil
|
||||
),
|
||||
string.format(' Command: %s', cmd),
|
||||
string.format(' Settings: %s', vim.inspect(client.settings, { newline = '\n ' })),
|
||||
string.format(
|
||||
|
||||
Reference in New Issue
Block a user