diff --git a/lua/metals.lua b/lua/metals.lua index 62b0903..78fbbe0 100644 --- a/lua/metals.lua +++ b/lua/metals.lua @@ -175,7 +175,7 @@ M.info = function() table.insert(output, " - https://github.com/scalameta/nvim-metals") table.insert(output, " - https://github.com/scalameta/metals") - output = lsp.util.trim_empty_lines(output) + output = vim.split(table.concat(output, "\n"), "\n", { trimempty = true }) local float = Float.percentage_range_window(0.6, 0.4, { winblend = 0 }, { title = "Metals Info", diff --git a/lua/metals/decoration.lua b/lua/metals/decoration.lua index 54d45b8..6921efc 100644 --- a/lua/metals/decoration.lua +++ b/lua/metals/decoration.lua @@ -23,7 +23,7 @@ M.set_decoration = function(bufnr, decoration) if decoration.hoverMessage then local hover_message = lsp.util.convert_input_to_markdown_lines(decoration.hoverMessage, {}) - hover_message = lsp.util.trim_empty_lines(hover_message) + hover_message = vim.split(table.concat(hover_message, "\n"), "\n", { trimempty = true }) hover_messages[ext_id] = hover_message end