diff options
author | Gregory Anders <greg@gpanders.com> | 2021-08-03 11:38:41 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-08-03 11:39:46 -0600 |
commit | 2093b12b82cfe0d982c092141fd77695c98b59f3 (patch) | |
tree | 1d44db97d1456bb342a4bf77f16a7664561e29dc /runtime/lua/vim/lsp/codelens.lua | |
parent | 8baf7bce2b51e8d3d47b6c70ce054663d927639a (diff) | |
download | rneovim-2093b12b82cfe0d982c092141fd77695c98b59f3.tar.gz rneovim-2093b12b82cfe0d982c092141fd77695c98b59f3.tar.bz2 rneovim-2093b12b82cfe0d982c092141fd77695c98b59f3.zip |
refactor: remove remaining references to nvim_buf_set_virtual_text
Diffstat (limited to 'runtime/lua/vim/lsp/codelens.lua')
-rw-r--r-- | runtime/lua/vim/lsp/codelens.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua index 46e2078507..fe581e42ad 100644 --- a/runtime/lua/vim/lsp/codelens.lua +++ b/runtime/lua/vim/lsp/codelens.lua @@ -123,7 +123,7 @@ function M.display(lenses, bufnr, client_id) end end if #chunks > 0 then - api.nvim_buf_set_virtual_text(bufnr, ns, i, chunks, {}) + api.nvim_buf_set_extmark(bufnr, ns, i, 0, { virt_text = chunks }) end end end @@ -179,12 +179,12 @@ local function resolve_lenses(lenses, bufnr, client_id, callback) -- Eager display to have some sort of incremental feedback -- Once all lenses got resolved there will be a full redraw for all lenses -- So that multiple lens per line are properly displayed - api.nvim_buf_set_virtual_text( + api.nvim_buf_set_extmark( bufnr, ns, lens.range.start.line, - {{ lens.command.title, 'LspCodeLens' },}, - {} + 0, + { virt_text = {{ lens.command.title, 'LspCodeLens' }} } ) end countdown() |