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/doc/api.txt | 3 +-- runtime/doc/lsp.txt | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index c525ea7a3a..dae7986fdb 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -661,8 +661,7 @@ nvim_create_namespace({name}) *nvim_create_namespace()* Creates a new namespace, or gets an existing one. Namespaces are used for buffer highlights and virtual text, - see |nvim_buf_add_highlight()| and - |nvim_buf_set_virtual_text()|. + see |nvim_buf_add_highlight()| and |nvim_buf_set_extmark()|. Namespaces can be named or anonymous. If `name` matches an existing namespace, the associated id is returned. If `name` diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 7daab4d6f1..9624f582a9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -538,7 +538,7 @@ Highlight groups related to |lsp-codelens| functionality. *hl-LspCodeLens* LspCodeLens Used to color the virtual text of the codelens. See - |nvim_buf_set_virtual_text()|. + |nvim_buf_set_extmark()|. LspCodeLensSeparator *hl-LspCodeLensSeparator* Used to color the seperator between two or more code lens. @@ -1376,7 +1376,8 @@ get_prev_pos({opts}) *vim.lsp.diagnostic.get_prev_pos()* *vim.lsp.diagnostic.get_virtual_text_chunks_for_line()* get_virtual_text_chunks_for_line({bufnr}, {line}, {line_diags}, {opts}) - Default function to get text chunks to display using `nvim_buf_set_virtual_text` . + Default function to get text chunks to display using + |nvim_buf_set_extmark()|. Parameters: ~ {bufnr} number The buffer to display the virtual @@ -1388,7 +1389,9 @@ get_virtual_text_chunks_for_line({bufnr}, {line}, {line_diags}, {opts}) |vim.lsp.diagnostic.set_virtual_text()| Return: ~ - table chunks, as defined by |nvim_buf_set_virtual_text()| + an array of [text, hl_group] arrays. This can be passed + directly to the {virt_text} option of + |nvim_buf_set_extmark()|. goto_next({opts}) *vim.lsp.diagnostic.goto_next()* Move to the next diagnostic -- cgit