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: suggest to create missing parameter as local binding #1271

Open
4 tasks done
jkone27 opened this issue Apr 23, 2024 · 1 comment
Open
4 tasks done

Code action: suggest to create missing parameter as local binding #1271

jkone27 opened this issue Apr 23, 2024 · 1 comment

Comments

@jkone27
Copy link
Contributor

jkone27 commented Apr 23, 2024

Details

When developing code, often we first write some parts and later we "fill them in" with implementations, one example is method parameters, would be great if one could just write the name of the method parameter, and then have a contextual action to create the parameter of the specified type, with maybe for now just the option as a local binding, maybe it could be adjusted to provide more options:

  • Local binding (within the same scope)
  • upper scope binding (module or global if a script..)

example

image

generate a code suggestion here / action , to generate the non existing local binding for the parameter

Checklist

  • I have looked through existing issues to make sure that this feature has not been requested before
  • I have provided a descriptive title for this issue
  • I am aware that even valid feature requests may be rejected if they do not align with the project's goals
  • I or my company would be willing to contribute this feature
@jkone27 jkone27 changed the title Suggest create missing parameter as local Code action: suggest to create missing parameter as local binding Apr 23, 2024
@baronfel
Copy link
Contributor

This is a great idea, I'd love to see an initial version of a codefix for this if you want to create one!

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

No branches or pull requests

2 participants