fix(lsp): util.lua attempt to concatenate userdata #39225

Problem:
Error when querying document symbols using python-lsp-server:

    lsp/util.lua:1955: attempt to concatenate field 'containerName' (a userdata value)

Solution:
Check for `vim.NIL`.
This commit is contained in:
Olivia Kinnear
2026-04-28 18:17:44 -05:00
committed by GitHub
parent 55ceb314ca
commit 1799aaebda
4 changed files with 15 additions and 6 deletions

View File

@@ -166,4 +166,11 @@ function M.get_forge_url(repo, target, target_type)
return ('%s/%s/%s'):format(repo, middle, target)
end
--- Check if value is `nil` or `vim.NIL`
---
--- @return boolean
function M.isnil(value)
return value == nil or value == vim.NIL
end
return M