-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Filing a new one as #6144 was closed as RLS specific, but the underlying issue exists with rust-analyzer as well. It also exists in my private "Konsole + Kate" workflow.
TLDR: Cargo should print span information for diagnostics, that is column and line numbers (plus file name) that are seen as relevant to the error or diagnostic. It can maybe also print snippets like rustc, but a good first step would be to have some span information at all.
Consider when you mistype a dependency in Cargo.toml: cargo gives an error that the dependency can't be found. But it does not point to the line. In many IDEs, when there is a string like Cargo.toml:15:0
, a ctrl+click on that opens the editor at right that spot. This is very helpful for editor workflows.
Instead, one has to look for the "actionable spot" of the error manually. This is sub-optimal and could be improved.
Earlier issues: