Can I filter Flow.collect member from code completion?

If I have a Flow and start typing “.col”, the primary suggestion that auto-complete gives me is the collect member method of Flow. Unfortunately, this is never the right answer since it should “never be used or implemented directly” as the docs point out.

Ideally the IDE wouldn’t present me with any @InternalCoroutinesApi methods in auto-complete.

I really love Flow except for that one collect method. It’s a repetitive annoyance and has caused some really poor first experiences with Flow while introducing it to others.

Is there a way to stop Android Studio’s auto-complete from presenting the member collect method but let it still present the extension collect methods?


Try Alt+Enter → “Exclude from completion” in the completion popup. Does that help?

Not so much. That only works for the extension methods which is what I want to keep. Alt + Enter has no effect for member methods (no popup). I also tried adding “kotlinx.coroutines.flow.Flow.collect” directly to the Auto Import exclusion list (which is how I stopped org.intellij.lang.annotations.Flow from always showing up) but that had no effect.

Thanks for the feedback!
Filed, will take care of it