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

Commit 01e4996

Browse files
committed
More nvim 0.10.0 fixes
Signed-off-by: Tomas Slusny <[email protected]>
1 parent 1f15eb3 commit 01e4996

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

lua/autocomplete/signature.lua

+17-7
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,23 @@ local function signature_handler(client, result, bufnr)
3030

3131
-- Highlight the active parameter.
3232
if hl then
33-
vim.highlight.range(
34-
fbuf,
35-
state.ns,
36-
'LspSignatureActiveParameter',
37-
{ hl[1], hl[2] },
38-
{ hl[3], hl[4] }
39-
)
33+
if vim.fn.has('nvim-0.11.0') == 1 then
34+
vim.highlight.range(
35+
fbuf,
36+
state.ns,
37+
'LspSignatureActiveParameter',
38+
{ hl[1], hl[2] },
39+
{ hl[3], hl[4] }
40+
)
41+
else
42+
vim.api.nvim_buf_add_highlight(
43+
fbuf,
44+
state.ns,
45+
'PmenuSel',
46+
vim.startswith(lines[1], '```') and 1 or 0,
47+
unpack(hl)
48+
)
49+
end
4050
end
4151
end
4252

0 commit comments

Comments
 (0)