I’m using Android Studio with Jetpack Compose, and I often use the “Find in Files” feature (Cmd + Shift + F / Ctrl + Shift + F / clicking in a function/class to see the usages) to search for code references.
However, all the @Preview composable functions show up in the search results, which makes it harder to locate the real usages of a composable within the app code.
For example, if I search for a composable name like LoginScreen, I get dozens of preview hits like this:
@Preview
@Composable
fun PreviewLoginScreen() {
LoginScreen()
}
These previews are only for design visualization and not actual code references.
Is there a way to exclude or disable Compose preview functions from showing up in code search results (e.g., by adjusting indexing, search filters, or naming conventions) inside Android Studio? Ideally, I’d like to keep previews functional for design, but not pollute my search results when looking for real usages in production code.