diff options
| author | Michael Clayton <mwc@clayto.com> | 2025-05-01 06:54:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-01 03:54:39 -0700 |
| commit | d567f899efb70b6e4934bd7bdb938a4e55a3da89 (patch) | |
| tree | b37df074b19f2bc7d689b55d8944a2c4e3bcddd0 /runtime/lua/vim/_ftplugin | |
| parent | 97a6259442526e33a73201557b1cb74ccdb64eef (diff) | |
| download | rneovim-d567f899efb70b6e4934bd7bdb938a4e55a3da89.tar.gz rneovim-d567f899efb70b6e4934bd7bdb938a4e55a3da89.tar.bz2 rneovim-d567f899efb70b6e4934bd7bdb938a4e55a3da89.zip | |
fix(diagnostic): allow virtual_{lines,text} cursor exclusivity #33517
Problem:
virtual_text diagnostics are great when skimming a file, and
virtual_lines are great when "zooming in" on a particular problem.
Having both enabled results in duplicate diagnostics on-screen.
Solution:
This PR expands the behavior of `current_line` for virtual_text and
virtual_lines by making `virtual_text.current_line = false` distinct
from `nil`. If you set:
vim.diagnostic.config({
virtual_text = { current_line = false },
virtual_lines = { current_line = true },
})
With this configuration, virtual_text will be used to display
diagnostics until the cursor reaches the same line, at which point they
will be hidden and virtual_lines will take its place.
Diffstat (limited to 'runtime/lua/vim/_ftplugin')
0 files changed, 0 insertions, 0 deletions