Skip to content

Commit 9bf58a7

Browse files
kilasuitrjmholt
authored andcommitted
Edit snippet to fix issue #1353 (#1354)
Edit snippet to fix issue 1353 * Default "function" snippet now has param() block * Old function snippet now available as "Function-Inline"
1 parent 4159c37 commit 9bf58a7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

snippets/PowerShell.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -762,12 +762,24 @@
762762
},
763763
"function": {
764764
"prefix": "function",
765+
"body": [
766+
"function ${1:FunctionName} {",
767+
"\tparam (",
768+
"\t ${2:OptionalParameters}",
769+
"\t)",
770+
"\t$0",
771+
"}"
772+
],
773+
"description": "Function definition snippet that contains a param block"
774+
},
775+
"Function-Inline": {
776+
"prefix": "Function-Inline",
765777
"body": [
766778
"function ${1:FunctionName} (${2:OptionalParameters}) {",
767779
"\t$0",
768780
"}"
769781
],
770-
"description": "function definition snippet"
782+
"description": "Function definition snippet that does not contain a param block, but defines parameters inline. This syntax is commonly used in other lanaguages"
771783
},
772784
"if": {
773785
"prefix": "if",

0 commit comments

Comments
 (0)