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

code action: create function body from undefined function diagnostic #431

Open
mhanberg opened this issue Apr 23, 2024 · 0 comments
Open
Assignees
Labels
code-action enhancement New feature or request good first issue Good for newcomers

Comments

@mhanberg
Copy link
Collaborator

Description

Sometimes when writing code, you might write down a function call to a function that doesn't exist yet. This will yield a compiler error that says undefined function foo_bar/2 (expected Foo.Bar to define such a function or for it to be imported, but none are available).

Solution

A code action that will create the function body for that function. It would be great to have one to create a public function and one to create a private function

In the above case, if you were to activate the action to create a public function, it would create one directly blow the function you are currently typing in and look like

  def foo_bar(param1, param2) do
  end
@mhanberg mhanberg added enhancement New feature or request good first issue Good for newcomers code-action labels Apr 23, 2024
@mhanberg mhanberg self-assigned this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-action enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant