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

Commit 22624f0

Browse files
authored
Merge pull request #379 from tomcur/correctly-trim
fix: signature help trimming breaks preview syntax
2 parents 2c5dda6 + 1bc7ed5 commit 22624f0

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
@@ -43,10 +43,13 @@ M.autoOpenSignatureHelp = function()
4343
if vim.tbl_isempty(lines) then
4444
return
4545
end
46+
47+
-- if `lines` can be trimmed, it is modified in place
48+
local trimmed_lines_filetype = vim.lsp.util.try_trim_markdown_code_blocks(lines)
4649
local bufnr, _ = vim.lsp.util.open_floating_preview(
4750
-- TODO show popup when signatures is empty?
4851
vim.lsp.util.trim_empty_lines(lines),
49-
vim.lsp.util.try_trim_markdown_code_blocks(lines),
52+
trimmed_lines_filetype,
5053
{}
5154
)
5255
-- setup a variable for floating window, fix #223

0 commit comments

Comments
 (0)