From f01c85278d7c10d2f951ca7c18793c824b093e6b Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Sat, 25 May 2024 06:19:20 -0500 Subject: [PATCH] fix: remove deprecated trim_emtpy_lines calls --- lua/metals.lua | 2 +- lua/metals/decoration.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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