From aa4f0879e35c43b186cf51c50f28847dd2df256c Mon Sep 17 00:00:00 2001 From: sim Date: Tue, 19 Oct 2021 09:41:57 -0700 Subject: 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) --- runtime/lua/vim/lsp/codelens.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua index 6d3912781e..63fcbe430b 100644 --- a/runtime/lua/vim/lsp/codelens.lua +++ b/runtime/lua/vim/lsp/codelens.lua @@ -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() -- cgit