yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
461 stars 54 forks source link

LspNextDiagnostic at end of diagnostics #413

Closed lucas-mior closed 4 months ago

lucas-mior commented 10 months ago

Hello, I would like to be able to find the next diagnostic after the last (like when vim continues search from top of the file). Can it be done?

yegappan commented 10 months ago

Are you looking for the :LspDiagNext command? The following commands are available to browse the diagnostics:

LspDiag first - Jump to the first diagnostic in the list
LspDiag last - Jump to the last diagnostic in the list
LspDiag next - Jump to the next diagnostic in the list
LspDiag prev - Jump to the previous diagnostic in the list

Are you looking for a command that wraps around the diagnostics, so it goes from the last diagnostic to the first diagnostic?

lucas-mior commented 9 months ago

Are you looking for a command that wraps around the diagnostics, so it goes from the last diagnostic to the first diagnostic?

Exactly.

nickspoons commented 6 months ago

This is how I prefer to navigate diagnostics too, so I've made PR #482 which adds this functionality, with :LspDiag nextWrap and :LspDiag prevWrap commands.