feat(diagnostic): add virt_lines_overflow option for virtual_lines #40178

Problem: Diagnostic virtual lines are hardcoded with "scroll" for
virt_lines_overflow option.

Solution: Add a `overflow` option to `virtual_lines` config
to support "wrap", "scroll", "trunc", and "auto".
This commit is contained in:
John Reid
2026-06-13 04:20:20 -04:00
committed by GitHub
parent c5d467323e
commit d52ebe317d
5 changed files with 21 additions and 7 deletions

View File

@@ -284,6 +284,10 @@ local M = vim._defer_require('vim.diagnostic', {
--- If the return value is nil, the diagnostic is not displayed by the handler.
--- Else the output text is used to display the diagnostic.
--- @field format? fun(diagnostic:vim.Diagnostic): string?
---
--- See `virt_lines_overflow` in |nvim_buf_set_extmark()|.
--- (default: `auto`)
--- @field overflow? 'trunc'|'scroll'|'wrap'|'auto'
--- @class vim.diagnostic.Opts.Signs
---