From 2093b12b82cfe0d982c092141fd77695c98b59f3 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Tue, 3 Aug 2021 11:38:41 -0600 Subject: refactor: remove remaining references to nvim_buf_set_virtual_text --- runtime/lua/vim/lsp/codelens.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/lua/vim/lsp/codelens.lua') 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() -- cgit