From 21eb175949296671e689575c2a3a0859f31bce85 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 13 Oct 2024 10:00:00 +0200 Subject: [PATCH] fix(menu): ensure correct arguments to stylize markdown --- lua/care/menu/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/care/menu/init.lua b/lua/care/menu/init.lua index 0aaec79..fde7f20 100644 --- a/lua/care/menu/init.lua +++ b/lua/care/menu/init.lua @@ -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