mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 17:11:48 +00:00
feat(extmark): virt_lines can highlight until EOL #41289
This commit is contained in:
3
runtime/lua/vim/_meta/api.gen.lua
generated
3
runtime/lua/vim/_meta/api.gen.lua
generated
@@ -671,7 +671,8 @@ function vim.api.nvim_buf_line_count(buf) end
|
||||
--- display of the text, except 'tabstop' is used for hard tabs. The 'wrap' and
|
||||
--- 'linebreak' options do not take effect, so the number of extra screen lines will
|
||||
--- match the list-size (but see `virt_lines_overflow`). By default lines are placed
|
||||
--- below the marked line.
|
||||
--- below the marked line. Special case: If the last `text_chunk` is empty,
|
||||
--- the corresponding `hl` will extend to the end of the line.
|
||||
--- - virt_lines_above: Place virtual lines above instead.
|
||||
--- - virt_lines_leftcol: Place virtual lines in the leftmost column of the window,
|
||||
--- bypassing sign and number columns.
|
||||
|
||||
@@ -247,6 +247,12 @@ function Completor:show(hint)
|
||||
col = col + skip - 1
|
||||
|
||||
local virt_lines = { unpack(lines, 2) }
|
||||
for i, s in ipairs(virt_lines) do
|
||||
if #s == 1 and s[1][1] == '' then
|
||||
virt_lines[i] = {}
|
||||
end
|
||||
end
|
||||
|
||||
api.nvim_buf_set_extmark(self.bufnr, namespace, row, col, {
|
||||
virt_text = virt_text,
|
||||
virt_lines = virt_lines,
|
||||
|
||||
Reference in New Issue
Block a user