feat(marks): virtual lines support horizontal scrolling (#32497)

Add a new field `virt_lines_overflow` that enables horizontal scrolling
for virtual lines when set to "scroll".
This commit is contained in:
zeertzjq
2025-02-20 21:47:12 +08:00
committed by GitHub
parent 574ea6a191
commit 51cf84daf9
12 changed files with 274 additions and 46 deletions

View File

@@ -641,7 +641,11 @@ function vim.api.nvim_buf_line_count(buffer) end
--- - virt_lines_leftcol: Place virtual lines in the leftmost
--- column of the window, bypassing
--- sign and number columns.
---
--- - virt_lines_overflow: controls how to handle virtual lines wider
--- than the window. Currently takes the one of the following values:
--- - "trunc": truncate virtual lines on the right (default).
--- - "scroll": virtual lines can scroll horizontally with 'nowrap',
--- otherwise the same as "trunc".
--- - ephemeral : for use with `nvim_set_decoration_provider()`
--- callbacks. The mark will only be used for the current
--- redraw cycle, and not be permantently stored in the

View File

@@ -258,6 +258,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? string
--- @field strict? boolean
--- @field sign_text? string
--- @field sign_hl_group? integer|string