Newer
Older
{
// Enable per-language
"[powershell]": {
"editor.formatOnSave": true
},
// Controls how the editor should render whitespace characters, possibilities are 'none', 'boundary', and 'all'. The 'boundary' option does not render single spaces between words.
"editor.renderWhitespace": "boundary", // Default: none
// Does not reformat one-line code blocks, such as "if (...) {...} else {...}".
"powershell.codeFormatting.ignoreOneLineBlock": false, // Default: True
// Adds a newline (line break) after a closing brace.
"powershell.codeFormatting.newLineAfterCloseBrace": true, // Default: True
// Adds a newline (line break) after an open brace.
"powershell.codeFormatting.newLineAfterOpenBrace": true, // Default: True
// Places open brace on the same line as its associated statement.
"powershell.codeFormatting.openBraceOnSameLine": true, // Default: True
// Adds a space after a separator (',' and ';').
"powershell.codeFormatting.whitespaceAfterSeparator": true, // Default: True
// Adds spaces before and after an operator ('=', '+', '-', etc.).
"powershell.codeFormatting.whitespaceAroundOperator": true, // Default: True
// Adds a space between a keyword and its associated scriptblock expression.
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true, // Default: True
// Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.
"powershell.codeFormatting.whitespaceBeforeOpenParen": true, // Default: True
// Align assignment statements in a hashtable or a DSC Configuration.
"powershell.codeFormatting.alignPropertyValuePairs": true // Default: True
}