File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3610,7 +3610,8 @@ export class DefaultClient implements Client {
3610
3610
const settings : OtherSettings = new OtherSettings ( vscode . workspace . getWorkspaceFolder ( formatUriAndRange . uri ) ?. uri ) ;
3611
3611
const formatOptions : vscode . FormattingOptions = {
3612
3612
insertSpaces : settings . editorInsertSpaces ?? true ,
3613
- tabSize : settings . editorTabSize ?? 4
3613
+ tabSize : settings . editorTabSize ?? 4 ,
3614
+ onChanges : true
3614
3615
} ;
3615
3616
3616
3617
const doFormat = async ( ) => {
@@ -3619,10 +3620,8 @@ export class DefaultClient implements Client {
3619
3620
return true ;
3620
3621
}
3621
3622
3622
- // TODO: Somehow invoke multiple range formatting (see https://github.com/microsoft/vscode/issues/193836).
3623
- // Maybe call DocumentRangeFormattingEditProvider.provideDocumentRangesFormattingEdits directly.
3624
3623
const formatTextEdits : vscode . TextEdit [ ] | undefined = await vscode . commands . executeCommand < vscode . TextEdit [ ] | undefined > (
3625
- "vscode.executeFormatRangeProvider " , formatUriAndRange . uri , formatUriAndRange . range , formatOptions ) ;
3624
+ "vscode.executeFormatDocumentProvider " , formatUriAndRange . uri , formatOptions ) ;
3626
3625
if ( ! formatTextEdits || formatTextEdits . length === 0 || versionBeforeFormatting === undefined ) {
3627
3626
return true ;
3628
3627
}
You can’t perform that action at this time.
0 commit comments