Metals: Show implicit arguments

Created on 6 Jan 2020  Â·  2Comments  Â·  Source: scalameta/metals

Is your feature request related to a problem? Please describe.

I’m always frustrated when I call a method that takes implicit parameters and I don’t know which argument values have been inferred by the compiler.

Describe the solution you'd like

It would be nice to have an action making the implicit arguments visible for a given selection, or globally visible.

Ideally, this action should be implemented (and specified) as a BSP endpoint, so that it could be reused by other IDEs (e.g., IntelliJ).

Describe alternatives you've considered

IntelliJ provides a “Show implicit arguments” action that, given a text selection, shows the inferred implicit arguments (note that all the arguments and their own arguments are shown as a tree):

Screenshot from 2019-12-27 14-01-59

They also have a “Show implicit hints” action that reveals all the implicit arguments and implicit conversions:

Screenshot from 2020-01-06 17-49-30

Search terms:

implicits

feature

Most helpful comment

I will take a stab at it, there is some much already implemented - I should be able to assemble it all together quickly I think.

All 2 comments

@julienrf this is essentially a more specific version of https://github.com/scalameta/metals-feature-requests/issues/21, which already contains some POC about this specific feature.

I'm 👍 in keeping both issues since this one is more focused, but I just wanted to point you to the existing discussion

I will take a stab at it, there is some much already implemented - I should be able to assemble it all together quickly I think.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laughedelic picture laughedelic  Â·  3Comments

fommil picture fommil  Â·  3Comments

ckipp01 picture ckipp01  Â·  3Comments

iokacha picture iokacha  Â·  4Comments

romanowski picture romanowski  Â·  4Comments