Skip to content

Commit 921bcb6

Browse files
author
Kapil Borle
committed
Add option to align assignment statements in hashtable
1 parent 6698b8a commit 921bcb6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@
408408
"default": true,
409409
"description": "Does not reformat one-line code blocks, such as \"if (...) {...} else {...}\"."
410410
},
411+
"powershell.codeFormatting.alignAssignmentsInHashtable": {
412+
"type": "boolean",
413+
"default": true,
414+
"description": "Align assignment statements in a hashtable."
415+
},
411416
"powershell.integratedConsole.showOnStartup": {
412417
"type": "boolean",
413418
"default": true,

src/settings.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface ICodeFormattingSettings {
1515
whitespaceAroundOperator: boolean;
1616
whitespaceAfterSeparator: boolean;
1717
ignoreOneLineBlock: boolean;
18+
alignAssignmentsInHashtable: boolean;
1819
}
1920

2021
export interface IScriptAnalysisSettings {
@@ -71,7 +72,8 @@ export function load(myPluginId: string): ISettings {
7172
whitespaceBeforeOpenParen: true,
7273
whitespaceAroundOperator: true,
7374
whitespaceAfterSeparator: true,
74-
ignoreOneLineBlock: true
75+
ignoreOneLineBlock: true,
76+
alignAssignmentsInHashtable: true
7577
};
7678

7779
let defaultIntegratedConsoleSettings: IIntegratedConsoleSettings = {

0 commit comments

Comments
 (0)