Skip to content

Create new symbol action should allow you to create a method #298

@ckipp01

Description

@ckipp01

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

Sometimes when I'm writing code I'm in this situation:

def doThing(a: Int, b: Int) = {
  doOtherStuff(a) // this will error because `doOtherStuff` doesn't exist
}

In this situations you can trigger a code action for doOtherStuff and it will show you the "Create new symbol 'doOtherStuff'" action. However, if you select that all the options are creating another file or a companion object, whereas I want doOtherStuff to be a method.

Describe the solution you'd like

I'd like another option to be offered, maybe just "method". And if I select it, the code I'd end up with is:

def doOtherStuff(a: Int) = ???

def doThing(a: Int, b: Int) = {
  doOtherStuff(a)
}

Describe alternatives you've considered

Doing this by hand

Additional context

No response

Search terms

create method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions