rust-analyzer
rust-analyzer copied to clipboard
In `#[allow()]` completion lints that are firing
A common action (especially when using clippy) is to observe reported lint and #[allow()] it. Therefore, it would be useful if, when completing with the cursor is inside an #[allow()], the ranking preferred the names of lints for which at least one diagnostic has been emitted within the syntax tree to which the #[allow()] attribute applies.
It probably makes sense to generalize this to any combination of attribute and diagnostic severity.
allowandexpectwould prefer current warnings and errorsdenyandforbidwould prefer current warningswarnwould prefer current errors
I took a look at implementing this, but I didn't find a way to fetch info about current diagnostics from inside ide_completion::completions::attribute::complete_known_attribute_input.