Open williamboman opened 1 year ago
Hi, thanks for the suggestion! I think this is a better first step than #2 for now.
I have tried to add this in the diagnostics branch fc44f8ea1ab0f880d382490e0141a667daa0bde8
Currently, I am using
backseat = {
virtual_lines = false,
virtual_text = false,
sign = false,
}
to give invisible diagnostics since I can't find a way to get multiple virtual lines or user specified hl groups working with diagnostics. This still lets you use vim.diagnostic.goto_next()
and such to move around and use :BackseatClear
to remove them from the buffer.
There are some issues, I think I will need to store all the diagnostics/extmarks in a table indexed by buffer number to fix them
vim.diagnostic.remove()
method to get rid of a single diagnostic), :BackseatClearLine
doesn't remove the corresponding diagnostic.Any help would be appreciated!
Hello! I think it'd be nice if the diagnostics API (
:h diagnostic-api
) was used to inject the feedback into the buffer. Currently it seems to be using a bespoke implementation via virtual lines. By leveraging the diagnostics API instead, users get a standardized interface for controlling behaviour. Personally, this would allow me to use the keybindings I'm familiar with to jump to next/previous diagnostic, moving diagnostics to quickfix, disabling a specific diagnostic source, etc.I have a fairly simple plugin that uses this approach that may be used as reference, I'd also be happy to contribute with a PR myself.