Skip to content

Commit

Permalink
fix(signature): nil check for parameter label. Fixes #435
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 18, 2023
1 parent 5c63a32 commit 9d778e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/noice/lsp/signature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ function M:format_signature(sig_index, sig)
for _, p in ipairs(sig.parameters) do
if p.documentation then
local pdoc = table.concat(Format.format_markdown(p.documentation or ""), "\n")
lines[#lines + 1] = "- " .. "`" .. p.label .. "`" .. " " .. pdoc
local line = { "-" }
if p.label then
line[#line + 1] = "`" .. p.label .. "`"
end
line[#line + 1] = pdoc
lines[#lines + 1] = table.concat(line, " ")
end
end
end
Expand Down

0 comments on commit 9d778e7

Please sign in to comment.