Skip to content

Add Function Help Snippet #3799

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

Closed
wants to merge 1 commit into from
Closed

Add Function Help Snippet #3799

wants to merge 1 commit into from

Conversation

JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented Jan 29, 2022

## PR Summary

This snippet is an improved version of the comment-help snippet using modern features like placeholders and providing more information about what each section means.

I am not replacing comment-help to preserve backwards compatibility for those who are used to it.

Input and Output were also removed because Input is generally specified by the parameters and Output should be specified with the `[OutputType]` attribute, if desired.

## PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an `x` between the square brackets.
Please mark anything not applicable to this PR `NA`.

- [x] PR has a meaningful title
- [x] Summarized changes
- [ NA] PR has tests
- [x] This PR is ready to merge and is not work in progress
- If the PR is work in progress, please add the prefix `WIP:` to the beginning of the title and remove the prefix when the PR is ready

@JustinGrote JustinGrote self-assigned this Jan 29, 2022
@JustinGrote JustinGrote changed the title Add Function-Help Snippet Add Function Help Snippet Jan 29, 2022
@PrzemyslawKlys
Copy link
Contributor

I would love if there was a functionality that allows to auto-add properties after the initial insert of comment based-help using ###. Do you think this is somehow feasible?

@andyleejordan
Copy link
Member

I could actually use some help cleaning up our snippets...e.g. #3404 and #3276.

@JustinGrote
Copy link
Collaborator Author

@PrzemyslawKlys Yes, I want something similar to Document This but for PowerShell, where you type <### after a function name and it will auto-fill as much as it can. I think it's feasible to build it as a separate extension rather than part of this one, but that's not in the scope of this.
https://marketplace.visualstudio.com/items?itemName=oouo-diogo-perdigao.docthis

@andschwa what is your tolerance on "breaking changes" in the snippets? Should everything always be net-new, or should we save the old ones off and provide instructions in the README how to import the "classics" into their user snippets if they want them?

@andyleejordan
Copy link
Member

Tolerance is high! Do it. This is the time and place especially with the big Preview happening.

@JustinGrote
Copy link
Collaborator Author

Would be neat if there was a way for a PS module to contribute its own snippets via a path in the .psd1 privatedata file too, that's for another time though.

@JustinGrote
Copy link
Collaborator Author

Closing in favor of a broader snippet refactor per discussion

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

Successfully merging this pull request may close these issues.

3 participants