Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Jump to corresponding file and line in trouble.nvim diagnostics #359

Open
utensil opened this issue Oct 27, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@utensil
Copy link
Contributor

utensil commented Oct 27, 2024

When using lean.nvim with trouble.nvim (similar to VSCode Problems panel), it would be nice if clicking on a Lean error message could go to the corresponding file and line, currently clicking on something like

 error: ././././LibraryName/FileName.lean:112:4: error message

in the diagnostic output has no effect.

Context:

Zulip

More information:

To reproduce, assuming you have 2 files, A.lean and B.lean, and B imports A. Now introduce an error in A, e.g. a typo of a type. If we open A.lean with lean.nvim, trouble will have a diagnostic message that can successfully jump to the error line, e.g.

image

But if we open file B, as the error comes from A, B will have a long error at where A is imported, but no way to jump to the acual error line in A:

image

(some long warning omitted in between)

image

It can only jump to the import of A, which is difficult to dive in for the cause of the error in A.

@Julian Julian added the enhancement New feature or request label Oct 27, 2024
@utensil
Copy link
Contributor Author

utensil commented Oct 27, 2024

In retrospect, I think it's unlikely for lean.nvim to support this, unless lean.nvim actively triggers an extra diagnostic for A even when A is not open, as the diagnostic for B could only jump to where A is imported, it can't have a second file location to jump to, except maybe if there is some kind of "nested diagnostic" design of Neovim and trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants