-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code action to add import for extension method in Scala 3 #228
Comments
I think this is exists already in terms of #105 and #141. How do I know? Because I've duplicated it too in the past (see #192). Also worth mentioning my half-assed attempt at implementing it scalameta/metals#2536 |
👀 I maybe didn't search before creating this like I should have 😆
I totally forgot about this! Closing this as a duplicate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When working in Scala 3 you will at times get diagnostics that mention that an import may fix the problem. For example I just tried using
"someString".toTermName
and Scala 3 returned this as a diagnosticDescribe the solution you'd like
In this situation I think it'd be perfect to also have a code action that can be triggered on
toTermName
which will offer to add the import in the same way we treat aNot Found:
diagnostic. In this case, the code action would importdotty.tools.dotc.core.Decorators.toTermName
Describe alternatives you've considered
Manually adding it.
Additional contex
No response
Search terms
Scala 3 extension code action import
The text was updated successfully, but these errors were encountered: