Ctrl + Q
to find implicit conversion
Shift + Cmd + P
to find the place of an implicit parameter instance
How do I find where an implicit value/def is used?
Ctrl + Q
to find implicit conversion
Shift + Cmd + P
to find the place of an implicit parameter instance
How do I find where an implicit value/def is used?
IntelliJ 2019.1 Scala Plugin now supports finding usages of implicits, in particular, going from the definition to the usage via Edit | Find | Find Usages
:
...previously the implicits hints allowed you to see usages of implicits and go from usages to definitions, but you couldn’t do the reverse – go from definitions to usages, by invoking
Find Usages
. Well, now you can...
The feature worked on my machine using both the IntelliJ's internal build tool, as well as system sbt version 1.2.7 via Use sbt shell
.
It seems to me that the standard "Show usage" command ought to list where implicit values are used. It does not currently do so (IDEA v 2018.1), but I think that is just a bug (or omission).
I have raised https://youtrack.jetbrains.com/issue/IDEA-199104 to alert JetBrains to this bug; I suggest you vote for that and subscribe to changes there.
I can't see any workaround or any other way to do this in IDEA.
There is at least a how key like Ctrl + Shift + Q to find implicits in scope
© 2022 - 2024 — McMap. All rights reserved.