From 5650ce2d90477fe35ff774345541ac8552af17f2 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 28 Nov 2017 17:09:32 +0000 Subject: [PATCH] Add PowerShell VSCode style settings (#5529) --- .vscode/settings.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b8279a4f50..792e547d8a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,20 @@ "[powershell]": { "files.trimTrailingWhitespace": true - } + }, + + // Sets the codeformatting options to follow the given indent style in a way that is compatible with PowerShell syntax. For more information about the brace styles please refer to https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81. + "powershell.codeFormatting.preset": "OTBS", + + // Adds a space between a keyword and its associated scriptblock expression. + "powershell.codeFormatting.whitespaceBeforeOpenBrace": true, + + // Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression. + "powershell.codeFormatting.whitespaceBeforeOpenParen": true, + + // Adds spaces before and after an operator ('=', '+', '-', etc.). + "powershell.codeFormatting.whitespaceAroundOperator": true, + + // Adds a space after a separator (',' and ';'). + "powershell.codeFormatting.whitespaceAfterSeparator": true }