when I use the fast find usage lookup, it gives me...
# android-studio
u
when I use the fast find usage lookup, it gives me placed in generated code as well (moshi json adapter), can I omit that somehow? it's noise most of the time
e
Turn off generated files toggle?
u
how
e
In the top bar of this “find” window that you just screen shotted halfway, its the one to the left of the
i
(which stands for imports)
If that toggle is already turned off, then its the case that the generated sources are erroneously registered as normal sources, in which case no out of the box solution. You will need to define a “scope” that excludes these files and use that instead. Search IJ custom files scope online …
u
its turned on.. but why would it help
as you said i is for imports
oh to the left sry
e
Yeah it should be off so it doesnt show results from “generated sources”
u
hm okay I turned it off and it still shows up however
e
Yeah then that means those files are not registered in IntelliJ as generated but as normal sources
u
if I click into the search result, the file is under generated sources
so what makes them registered as generated
e
Yes the folder desnt matter its the tool/plugin that registers the folder with the IJ model, in this case Gradle/Kotlin IJ Plugin
u
well its ksp + moshi .. okay so its ksp fault
e
Yup. if I remember correctly ksp (since it runs before kotlin) registers the files it generates as sources to the kotlin compile which make them appear in the IDE as normal sources. Not much you can do other than manually marking them as generated sources
u
image.png
e
Yup exactly “sources root”
u
anychane its moshi's fault? or should I go complain to ksp
hm, is it stil valid?
👌 1
seems like just the path should be enough
e
No not moshi’s fault. And not necessarily ksp’s too. But feel free to report to ksp. They will most likely point to Gradle but lets see
u
will see, thanks!