feat(extmark): virt_lines_overflow "wrap" and "auto"

Problem: Extmark has support for horizontal scrolling and truncating, but not wrapping.

Solution: Extend virt_lines_overflow flags to support "wrap" and "auto" based on proposed changes in #18282.
This commit is contained in:
jreidx
2026-06-02 18:05:51 -04:00
committed by zeertzjq
parent bb93ad2258
commit d9aa06eed8
11 changed files with 473 additions and 25 deletions

View File

@@ -696,6 +696,8 @@ function vim.api.nvim_buf_line_count(buf) end
--- - "trunc": truncate virtual lines on the right (default).
--- - "scroll": virtual lines can scroll horizontally with 'nowrap',
--- otherwise the same as "trunc".
--- - "wrap": virtual lines can wrap onto extra lines.
--- - "auto": virtual lines wrap with 'wrap' and scroll horizontally with 'nowrap'.
--- - virt_text : [](virtual-text) to link to this mark.
--- A list of `[text, highlight]` tuples, each representing a
--- text chunk with specified highlight. `highlight` element

View File

@@ -441,7 +441,7 @@ error('Cannot require a meta file')
--- @field virt_lines? any[]
--- @field virt_lines_above? boolean
--- @field virt_lines_leftcol? boolean
--- @field virt_lines_overflow? "trunc"|"scroll"
--- @field virt_lines_overflow? "trunc"|"scroll"|"wrap"|"auto"
--- @field virt_text? any[]
--- @field virt_text_hide? boolean
--- @field virt_text_pos? "eol"|"eol_right_align"|"overlay"|"right_align"|"inline"