Skip to content

Commit

Permalink
fix(menu): ensure correct arguments to stylize markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
max397574 committed Oct 20, 2024
1 parent 3c5cb42 commit 21eb175
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/care/menu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ function Menu:draw_docs(entry)
format = "plaintext"
contents = vim.split(documentation.value or "", "\n", { trimempty = true })
else
contents = vim.lsp.util.convert_input_to_markdown_lines(documentation --[[@as string]])
contents = vim.lsp.util.convert_input_to_markdown_lines(
(type(documentation) == "table" and (documentation.value or "")) or (documentation or "") --[[@as string]]
)
end

if completion_item.detail and completion_item.detail ~= "" then
Expand Down

0 comments on commit 21eb175

Please sign in to comment.