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 {
36103610 const settings : OtherSettings = new OtherSettings ( vscode . workspace . getWorkspaceFolder ( formatUriAndRange . uri ) ?. uri ) ;
36113611 const formatOptions : vscode . FormattingOptions = {
36123612 insertSpaces : settings . editorInsertSpaces ?? true ,
3613- tabSize : settings . editorTabSize ?? 4
3613+ tabSize : settings . editorTabSize ?? 4 ,
3614+ onChanges : true
36143615 } ;
36153616
36163617 const doFormat = async ( ) => {
@@ -3619,10 +3620,8 @@ export class DefaultClient implements Client {
36193620 return true ;
36203621 }
36213622
3622- // TODO: Somehow invoke multiple range formatting (see https://github.com/microsoft/vscode/issues/193836).
3623- // Maybe call DocumentRangeFormattingEditProvider.provideDocumentRangesFormattingEdits directly.
36243623 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 ) ;
36263625 if ( ! formatTextEdits || formatTextEdits . length === 0 || versionBeforeFormatting === undefined ) {
36273626 return true ;
36283627 }
You can’t perform that action at this time.
0 commit comments