feat(diagnostic): jump to related info location from open_float #34837

This commit allows users to jump to the location specified in a
diagnostic's `relatedInformation`, using `gf` from within the
`open_float` window. The cursor need only be on line that displays the
related info.
This commit is contained in:
Riley Bruins
2025-07-10 11:24:17 -07:00
committed by GitHub
parent 7bd4dfd209
commit 68e316e3f9
5 changed files with 113 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
---@brief This module provides functionality for requesting LSP diagnostics for a document/workspace
---and populating them using |vim.Diagnostic|s. `DiagnosticRelatedInformation` is supported: it is
---included in the window shown by |vim.diagnostic.open_float()|.
---included in the window shown by |vim.diagnostic.open_float()|. When the cursor is on a line with
---related information, |gf| jumps to the problem location.
local lsp = vim.lsp
local protocol = lsp.protocol