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

Support "Fill labels" code action if there are already arguments provided #3885

Closed
joshi-monster opened this issue Nov 24, 2024 · 2 comments · Fixed by #4137
Closed

Support "Fill labels" code action if there are already arguments provided #3885

joshi-monster opened this issue Nov 24, 2024 · 2 comments · Fixed by #4137
Labels
help wanted Contributions encouraged priority:medium

Comments

@joshi-monster
Copy link
Contributor

joshi-monster commented Nov 24, 2024

The language server supports a "add labels" code action, but only if there are no explicit arguments provided:

before:

fn wibble(a a: Int, b b: Float, c c: String) {
  a + b + c
}

fn wobble() {
  wibble()
  //    ^
}

after:

fn wobble() {
  wibble(a: todo, b: todo, c: todo)
}

It would be great if this code action could also support cases where I already partially supply arguments to a function or record constructor. This would be really useful if I added a new argument(s) or field(s), and I want to now update all the call-sides with the new arguments. This code action could add the missing labels for me, so I would have to just fill out the values. ~ 💜

@lpil
Copy link
Member

lpil commented Nov 25, 2024

Sounds good!

@lpil lpil added help wanted Contributions encouraged priority:medium labels Nov 25, 2024
@giacomocavalieri
Copy link
Member

This was not implemented at first because I couldn't figure out how to do it... good news is, fixing #4122 I have figured out how to do it. Once #4131 it should be pretty easy to fix this, I'm working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants