-
Notifications
You must be signed in to change notification settings - Fork 5
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
Show parameter name in methods for simple types #184
Comments
This could be a really nice feature. Maybe also a code action to permanently add the parameter names in the code ? |
This can actually be a much simpler thing to do. Could you open a separate feature request? |
Of course, did it :) thanks a lot @tgodzik |
Hey, is anybody already working on this? Since this is one of the most features I miss from the IntelliJ Scala Plugin, I'm willing to work on this maybe next weekend :) |
@tanishiking no one that I know of, this would be awesome! |
So, this should be possible using compiler API. |
Another possibility would be to cache signatures for methods workspace wide, but that would add a lot of memory overhead I feel. Using the presentation compiler might not actually be that bad since we already get typed tree each time we open a file, so we would get that information anyway. It would be good to benchmark the approach before going this way though. |
Is your feature request related to a problem? Please describe.
With code like:
it would be good to show name of the parameter so that we see:
easyMethod(boolParam = true)
The same should probably apply to
Int
,Double
,Float
.Describe the solution you'd like
We should be able to achieve it via decorations, similar to how we do it in case of type decorations. The main difficulty here is making sure the we don't search for the name each time a request is made, since there might a larger number of methods and we load decorations for the entire file at the same time.
Describe alternatives you've considered
Writing it manually always.
Additional context
This is a follow up from #21
Search terms:
named parameters decorations inferred information
The text was updated successfully, but these errors were encountered: