File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ type formattingStyle = {
1111} ;
1212
1313function getFormattingStyle ( options : vscode . FormattingOptions ) : formattingStyle {
14- const styleName : 'tight' | 'default' = vscode . workspace . getConfiguration ( 'tmlanguage-syntax-highlighter' ) . get ( 'formattingStyle' ) ;
14+ const bracketStyle : 'tight' | 'default' = vscode . workspace . getConfiguration ( 'tmlanguage-syntax-highlighter' ) . get ( 'formattingStyle' ) ;
1515 const style : formattingStyle = {
1616 tabType : options . insertSpaces ? ' ' : '\t' ,
1717 tabSize : options . insertSpaces ? options . tabSize : 1 ,
18- wsBrackets : styleName == 'tight' ? '' : ' ' ,
18+ wsBrackets : bracketStyle == 'tight' ? '' : ' ' ,
1919 } ;
2020 return style ;
2121}
@@ -114,7 +114,7 @@ export const OnTypeFormattingEditProvider: vscode.OnTypeFormattingEditProvider =
114114 let parent = node . parent ;
115115 while ( parent ) {
116116 parent = parent . parent ;
117- level ++ ;
117+ level += style . tabSize ;
118118 } ;
119119
120120 const indent = Math . min ( level , node . startPosition . column ) ;
You can’t perform that action at this time.
0 commit comments