Hey everyone, I've been fixing an issue with the
fix_visibility assist and I want to do some refactoring while I'm there - namely turning it into a quickfix.
I guess I'll have to first generate a diagnostic, right? Does anyone already have a rough idea where such a diagnostic could be created?
fix_visibility should already be a quickfix: https://github.com/rust-analyzer/rust-analyzer/blob/f51b0cfdd6c23dd57a0a11154179730171c0425d/crates/ra_assists/src/handlers/fix_visibility.rs#L61
Are you using vscode? If not you'll need to make sure that your client is sending down that it supports the capability
well, it's currently an assist, not a quickfix. see the discussion in this ticket: https://github.com/rust-analyzer/rust-analyzer/issues/4563
hmm, I've been reading through the code a little bit, trying to find if
Visibility is used somewhere in the analysis where I could maybe generate a new Diagnostic, and so far all usages of
Visibility that I found were for autocompletion/find usages/fix visibility.
does RA currently ignore visibility, leaving visibility errors completely up to
I'm still struggling to find a place where that could be added though... maybe something inside
yeah, I think adding such diagnostics requires a bunch of design work and refactoring, because currently names get resolved in lots of places depending on where they are
damnit... okay that dampens my enthusiasm a little :)