Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 1bc7ed5

Browse files
committed
fix: signature help trimming breaks preview syntax
1 parent 5602094 commit 1bc7ed5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/completion/signature_help.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ M.autoOpenSignatureHelp = function()
4242
if vim.tbl_isempty(lines) then
4343
return
4444
end
45+
46+
-- if `lines` can be trimmed, it is modified in place
47+
local trimmed_lines_filetype = vim.lsp.util.try_trim_markdown_code_blocks(lines)
4548
local bufnr, _ = vim.lsp.util.open_floating_preview(
4649
-- TODO show popup when signatures is empty?
4750
vim.lsp.util.trim_empty_lines(lines),
48-
vim.lsp.util.try_trim_markdown_code_blocks(lines),
51+
trimmed_lines_filetype,
4952
{}
5053
)
5154
-- setup a variable for floating window, fix #223

0 commit comments

Comments
 (0)