aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp
diff options
context:
space:
mode:
authorsim <simrats169169@gmail.com>2021-10-19 09:41:57 -0700
committerGitHub <noreply@github.com>2021-10-19 18:41:57 +0200
commitaa4f0879e35c43b186cf51c50f28847dd2df256c (patch)
tree11a10bfadb41b0b6a2f40c12682033b8c9f6b42f /runtime/lua/vim/lsp
parent308fd88d0d48a21460cdc61966b7f249f3d26981 (diff)
downloadrneovim-aa4f0879e35c43b186cf51c50f28847dd2df256c.tar.gz
rneovim-aa4f0879e35c43b186cf51c50f28847dd2df256c.tar.bz2
rneovim-aa4f0879e35c43b186cf51c50f28847dd2df256c.zip
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)
Diffstat (limited to 'runtime/lua/vim/lsp')
-rw-r--r--runtime/lua/vim/lsp/codelens.lua6
1 files changed, 4 insertions, 2 deletions
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()