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

@@ -2386,10 +2386,12 @@ describe('vim.diagnostic', function()
})
local extmarks = _G.get_virt_lines_extmarks(_G.diagnostic_ns)
return extmarks[1][4].virt_lines
return extmarks
end)
eq('miss-symbol: Missed symbol `,`', result[1][3][1])
eq(1, #result)
eq('auto', result[1][4].virt_lines_overflow)
eq('miss-symbol: Missed symbol `,`', result[1][4].virt_lines[1][3][1])
end)
it('adds space to the left of the diagnostic', function()