Skip to content

Edited Snippet to fix issue #1353 #1354

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

Merged
merged 5 commits into from
Jun 12, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion snippets/PowerShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -762,12 +762,24 @@
},
"function": {
"prefix": "function",
"body": [
"function ${1:FunctionName} {",
"\tparam (",
"\t ${2:OptionalParameters}",
"\t)",
"\t$0",
"}"
],
"description": "function definition snippet that contains a param block"
},
"function-NoParam": {
"prefix": "function-noparam",
"body": [
"function ${1:FunctionName} (${2:OptionalParameters}) {",
"\t$0",
"}"
],
"description": "function definition snippet"
"description": "function definition snippet that does not contain a param block and is more typically seen in C#"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we describe this as just function definition snippet with inline parameters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do but I think this is more informative, and explains in not too much info where a user may see this syntax elsewhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, my main objection is that the last bit about "and is more typically seen in C#" reads a bit too "opinionated" IMO. :-) Maybe just remove that bit?

},
"if": {
"prefix": "if",
Expand Down