Skip to content
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

supporting auto generation of methods in Create New Symbol Action #284

Open
vzmerr opened this issue Jul 15, 2022 · 1 comment
Open

supporting auto generation of methods in Create New Symbol Action #284

vzmerr opened this issue Jul 15, 2022 · 1 comment

Comments

@vzmerr
Copy link

vzmerr commented Jul 15, 2022

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

It would be cool if Metals adds Method to the suggested list for creating a new symbol.
CreateNewMethod

Describe the solution you'd like

It would be better if the option to generate a method like:

def buildNewSchool(arg1: String, arg2: Int): School = ???

is added to the list of symbol types.

Describe alternatives you've considered

not implementing this.

Additional contex

IntelliJ currently supports that; and it saves the programmer lots of time, particularly when the arguments list is big. It would be awesome if Metals adds support for it, too.

Search terms

Inferring Methods Create New Symbol Code Action

@tgodzik
Copy link
Contributor

tgodzik commented Jul 15, 2022

The work is started in scalameta/metals@e7c21ae

Main issue is that we don't sometimes get the types if the method is invalid, so we might need to replace the invalid method with something like identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants