feat(lsp): set codelens virtual text hl_mode to combine (#16048)

It looks a bit off with the extmark going over the cursorline.

(With hl_mode combine it keeps the background of the cursorline under the codelens virtualtext)
This commit is contained in:
sim 2021-10-19 09:41:57 -07:00 committed by GitHub
parent 308fd88d0d
commit aa4f0879e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,8 @@ function M.display(lenses, bufnr, client_id)
end
end
if #chunks > 0 then
api.nvim_buf_set_extmark(bufnr, ns, i, 0, { virt_text = chunks })
api.nvim_buf_set_extmark(bufnr, ns, i, 0, { virt_text = chunks,
hl_mode="combine" })
end
end
end
@ -199,7 +200,8 @@ local function resolve_lenses(lenses, bufnr, client_id, callback)
ns,
lens.range.start.line,
0,
{ virt_text = {{ lens.command.title, 'LspCodeLens' }} }
{ virt_text = {{ lens.command.title, 'LspCodeLens' }},
hl_mode="combine" }
)
end
countdown()