Skip to content

Commit 71966e4

Browse files
authored
auto save - make it language overridable and add more settings (#200326)
* auto save - make it language overridable and add more settings * . * . * fix tests * . * . * . * . * cache * . * .
1 parent b8ea8d1 commit 71966e4

File tree

22 files changed

+312
-198
lines changed

22 files changed

+312
-198
lines changed

src/vs/platform/files/common/files.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,25 +1453,29 @@ export interface IGlobPatterns {
14531453
}
14541454

14551455
export interface IFilesConfiguration {
1456-
files: {
1457-
associations: { [filepattern: string]: string };
1458-
exclude: IExpression;
1459-
watcherExclude: IGlobPatterns;
1460-
watcherInclude: string[];
1461-
encoding: string;
1462-
autoGuessEncoding: boolean;
1463-
defaultLanguage: string;
1464-
trimTrailingWhitespace: boolean;
1465-
autoSave: string;
1466-
autoSaveDelay: number;
1467-
eol: string;
1468-
enableTrash: boolean;
1469-
hotExit: string;
1470-
saveConflictResolution: 'askUser' | 'overwriteFileOnDisk';
1471-
readonlyInclude: IGlobPatterns;
1472-
readonlyExclude: IGlobPatterns;
1473-
readonlyFromPermissions: boolean;
1474-
};
1456+
files: IFilesConfigurationNode;
1457+
}
1458+
1459+
export interface IFilesConfigurationNode {
1460+
associations: { [filepattern: string]: string };
1461+
exclude: IExpression;
1462+
watcherExclude: IGlobPatterns;
1463+
watcherInclude: string[];
1464+
encoding: string;
1465+
autoGuessEncoding: boolean;
1466+
defaultLanguage: string;
1467+
trimTrailingWhitespace: boolean;
1468+
autoSave: string;
1469+
autoSaveDelay: number;
1470+
autoSaveWorkspaceFilesOnly: boolean;
1471+
autoSaveWhenNoErrors: boolean;
1472+
eol: string;
1473+
enableTrash: boolean;
1474+
hotExit: string;
1475+
saveConflictResolution: 'askUser' | 'overwriteFileOnDisk';
1476+
readonlyInclude: IGlobPatterns;
1477+
readonlyExclude: IGlobPatterns;
1478+
readonlyFromPermissions: boolean;
14751479
}
14761480

14771481
//#endregion

src/vs/workbench/browser/parts/editor/editorActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,14 +605,14 @@ abstract class AbstractCloseAllAction extends Action2 {
605605

606606
// Editor will be saved on focus change when a
607607
// dialog appears, so just track that separate
608-
else if (filesConfigurationService.getAutoSaveMode() === AutoSaveMode.ON_FOCUS_CHANGE && !editor.hasCapability(EditorInputCapabilities.Untitled)) {
608+
else if (filesConfigurationService.getAutoSaveMode(editor) === AutoSaveMode.ON_FOCUS_CHANGE && !editor.hasCapability(EditorInputCapabilities.Untitled)) {
609609
dirtyAutoSaveOnFocusChangeEditors.add({ editor, groupId });
610610
}
611611

612612
// Windows, Linux: editor will be saved on window change
613613
// when a native dialog appears, so just track that separate
614614
// (see https://github.com/microsoft/vscode/issues/134250)
615-
else if ((isNative && (isWindows || isLinux)) && filesConfigurationService.getAutoSaveMode() === AutoSaveMode.ON_WINDOW_CHANGE && !editor.hasCapability(EditorInputCapabilities.Untitled)) {
615+
else if ((isNative && (isWindows || isLinux)) && filesConfigurationService.getAutoSaveMode(editor) === AutoSaveMode.ON_WINDOW_CHANGE && !editor.hasCapability(EditorInputCapabilities.Untitled)) {
616616
dirtyAutoSaveOnWindowChangeEditors.add({ editor, groupId });
617617
}
618618

src/vs/workbench/browser/parts/editor/editorAutoSave.ts

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
77
import { Disposable, DisposableStore, IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle';
8-
import { IFilesConfigurationService, AutoSaveMode, IAutoSaveConfiguration } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
8+
import { IFilesConfigurationService, AutoSaveMode } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
99
import { IHostService } from 'vs/workbench/services/host/browser/host';
1010
import { SaveReason, IEditorIdentifier, GroupIdentifier, ISaveOptions, EditorInputCapabilities } from 'vs/workbench/common/editor';
1111
import { EditorInput } from 'vs/workbench/common/editor/editorInput';
@@ -18,7 +18,6 @@ import { ILogService } from 'vs/platform/log/common/log';
1818
export class EditorAutoSave extends Disposable implements IWorkbenchContribution {
1919

2020
// Auto save: after delay
21-
private autoSaveAfterDelay: number | undefined;
2221
private readonly pendingAutoSavesAfterDelay = new Map<IWorkingCopy, IDisposable>();
2322

2423
// Auto save: focus change & window change
@@ -36,9 +35,6 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
3635
) {
3736
super();
3837

39-
// Figure out initial auto save config
40-
this.onAutoSaveConfigurationChange(filesConfigurationService.getAutoSaveConfiguration(), false);
41-
4238
// Fill in initial dirty working copies
4339
for (const dirtyWorkingCopy of this.workingCopyService.dirtyWorkingCopies) {
4440
this.onDidRegister(dirtyWorkingCopy);
@@ -51,7 +47,7 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
5147
this._register(this.hostService.onDidChangeFocus(focused => this.onWindowFocusChange(focused)));
5248
this._register(this.hostService.onDidChangeActiveWindow(() => this.onActiveWindowChange()));
5349
this._register(this.editorService.onDidActiveEditorChange(() => this.onDidActiveEditorChange()));
54-
this._register(this.filesConfigurationService.onAutoSaveConfigurationChange(config => this.onAutoSaveConfigurationChange(config, true)));
50+
this._register(this.filesConfigurationService.onDidChangeAutoSaveConfiguration(() => this.onDidChangeAutoSaveConfiguration()));
5551

5652
// Working Copy events
5753
this._register(this.workingCopyService.onDidRegister(workingCopy => this.onDidRegister(workingCopy)));
@@ -95,57 +91,52 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
9591
}
9692

9793
private maybeTriggerAutoSave(reason: SaveReason, editorIdentifier?: IEditorIdentifier): void {
98-
if (editorIdentifier?.editor.isReadonly() || editorIdentifier?.editor.hasCapability(EditorInputCapabilities.Untitled)) {
99-
return; // no auto save for readonly or untitled editors
100-
}
94+
if (editorIdentifier) {
95+
if (editorIdentifier.editor.isReadonly() || editorIdentifier.editor.hasCapability(EditorInputCapabilities.Untitled)) {
96+
return; // no auto save for readonly or untitled editors
97+
}
10198

102-
// Determine if we need to save all. In case of a window focus change we also save if
103-
// auto save mode is configured to be ON_FOCUS_CHANGE (editor focus change)
104-
const mode = this.filesConfigurationService.getAutoSaveMode();
105-
if (
106-
(reason === SaveReason.WINDOW_CHANGE && (mode === AutoSaveMode.ON_FOCUS_CHANGE || mode === AutoSaveMode.ON_WINDOW_CHANGE)) ||
107-
(reason === SaveReason.FOCUS_CHANGE && mode === AutoSaveMode.ON_FOCUS_CHANGE)
108-
) {
109-
this.logService.trace(`[editor auto save] triggering auto save with reason ${reason}`);
99+
// Determine if we need to save all. In case of a window focus change we also save if
100+
// auto save mode is configured to be ON_FOCUS_CHANGE (editor focus change)
101+
const mode = this.filesConfigurationService.getAutoSaveMode(editorIdentifier.editor);
102+
if (
103+
(reason === SaveReason.WINDOW_CHANGE && (mode === AutoSaveMode.ON_FOCUS_CHANGE || mode === AutoSaveMode.ON_WINDOW_CHANGE)) ||
104+
(reason === SaveReason.FOCUS_CHANGE && mode === AutoSaveMode.ON_FOCUS_CHANGE)
105+
) {
106+
this.logService.trace(`[editor auto save] triggering auto save with reason ${reason}`);
110107

111-
if (editorIdentifier) {
112108
this.editorService.save(editorIdentifier, { reason });
113-
} else {
114-
this.saveAllDirty({ reason });
115109
}
110+
} else {
111+
this.saveAllDirtyAutoSaveables({ reason });
116112
}
117113
}
118114

119-
private onAutoSaveConfigurationChange(config: IAutoSaveConfiguration, fromEvent: boolean): void {
120-
121-
// Update auto save after delay config
122-
this.autoSaveAfterDelay = (typeof config.autoSaveDelay === 'number') && config.autoSaveDelay >= 0 ? config.autoSaveDelay : undefined;
115+
private onDidChangeAutoSaveConfiguration(): void {
123116

124117
// Trigger a save-all when auto save is enabled
125-
if (fromEvent) {
126-
let reason: SaveReason | undefined = undefined;
127-
switch (this.filesConfigurationService.getAutoSaveMode()) {
128-
case AutoSaveMode.ON_FOCUS_CHANGE:
129-
reason = SaveReason.FOCUS_CHANGE;
130-
break;
131-
case AutoSaveMode.ON_WINDOW_CHANGE:
132-
reason = SaveReason.WINDOW_CHANGE;
133-
break;
134-
case AutoSaveMode.AFTER_SHORT_DELAY:
135-
case AutoSaveMode.AFTER_LONG_DELAY:
136-
reason = SaveReason.AUTO;
137-
break;
138-
}
118+
let reason: SaveReason | undefined = undefined;
119+
switch (this.filesConfigurationService.getAutoSaveMode(undefined)) {
120+
case AutoSaveMode.ON_FOCUS_CHANGE:
121+
reason = SaveReason.FOCUS_CHANGE;
122+
break;
123+
case AutoSaveMode.ON_WINDOW_CHANGE:
124+
reason = SaveReason.WINDOW_CHANGE;
125+
break;
126+
case AutoSaveMode.AFTER_SHORT_DELAY:
127+
case AutoSaveMode.AFTER_LONG_DELAY:
128+
reason = SaveReason.AUTO;
129+
break;
130+
}
139131

140-
if (reason) {
141-
this.saveAllDirty({ reason });
142-
}
132+
if (reason) {
133+
this.saveAllDirtyAutoSaveables({ reason });
143134
}
144135
}
145136

146-
private saveAllDirty(options?: ISaveOptions): void {
137+
private saveAllDirtyAutoSaveables(options?: ISaveOptions): void {
147138
for (const workingCopy of this.workingCopyService.dirtyWorkingCopies) {
148-
if (!(workingCopy.capabilities & WorkingCopyCapabilities.Untitled)) {
139+
if (!(workingCopy.capabilities & WorkingCopyCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode(workingCopy.resource) !== AutoSaveMode.OFF) {
149140
workingCopy.save(options);
150141
}
151142
}
@@ -179,7 +170,8 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
179170
}
180171

181172
private scheduleAutoSave(workingCopy: IWorkingCopy): void {
182-
if (typeof this.autoSaveAfterDelay !== 'number') {
173+
const autoSaveAfterDelay = this.filesConfigurationService.getAutoSaveConfiguration(workingCopy.resource).autoSaveDelay;
174+
if (typeof autoSaveAfterDelay !== 'number') {
183175
return; // auto save after delay must be enabled
184176
}
185177

@@ -190,7 +182,7 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
190182
// Clear any running auto save operation
191183
this.discardAutoSave(workingCopy);
192184

193-
this.logService.trace(`[editor auto save] scheduling auto save after ${this.autoSaveAfterDelay}ms`, workingCopy.resource.toString(), workingCopy.typeId);
185+
this.logService.trace(`[editor auto save] scheduling auto save after ${autoSaveAfterDelay}ms`, workingCopy.resource.toString(), workingCopy.typeId);
194186

195187
// Schedule new auto save
196188
const handle = setTimeout(() => {
@@ -199,11 +191,11 @@ export class EditorAutoSave extends Disposable implements IWorkbenchContribution
199191
this.discardAutoSave(workingCopy);
200192

201193
// Save if dirty
202-
if (workingCopy.isDirty()) {
194+
if (workingCopy.isDirty() && this.filesConfigurationService.getAutoSaveMode(workingCopy.resource) !== AutoSaveMode.OFF) {
203195
this.logService.trace(`[editor auto save] running auto save`, workingCopy.resource.toString(), workingCopy.typeId);
204196
workingCopy.save({ reason: SaveReason.AUTO });
205197
}
206-
}, this.autoSaveAfterDelay);
198+
}, autoSaveAfterDelay);
207199

208200
// Keep in map for disposal as needed
209201
this.pendingAutoSavesAfterDelay.set(workingCopy, toDisposable(() => {

src/vs/workbench/browser/parts/editor/editorGroupView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
15741574

15751575
// Auto-save on focus change: save, because a dialog would steal focus
15761576
// (see https://github.com/microsoft/vscode/issues/108752)
1577-
if (this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.ON_FOCUS_CHANGE) {
1577+
if (this.filesConfigurationService.getAutoSaveMode(editor) === AutoSaveMode.ON_FOCUS_CHANGE) {
15781578
autoSave = true;
15791579
confirmation = ConfirmResult.SAVE;
15801580
saveReason = SaveReason.FOCUS_CHANGE;
@@ -1583,7 +1583,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
15831583
// Auto-save on window change: save, because on Windows and Linux, a
15841584
// native dialog triggers the window focus change
15851585
// (see https://github.com/microsoft/vscode/issues/134250)
1586-
else if ((isNative && (isWindows || isLinux)) && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.ON_WINDOW_CHANGE) {
1586+
else if ((isNative && (isWindows || isLinux)) && this.filesConfigurationService.getAutoSaveMode(editor) === AutoSaveMode.ON_WINDOW_CHANGE) {
15871587
autoSave = true;
15881588
confirmation = ConfirmResult.SAVE;
15891589
saveReason = SaveReason.WINDOW_CHANGE;

src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements
318318
// and it could result in bad UX where an editor can be closed even though
319319
// it shows up as dirty and has not finished saving yet.
320320

321-
if (this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
321+
if (this.filesConfigurationService.getAutoSaveMode(this) === AutoSaveMode.AFTER_SHORT_DELAY) {
322322
return true; // a short auto save is configured, treat this as being saved
323323
}
324324

src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TextFileEditorTracker extends Disposable implements IWorkbenchContr
6969
return false; // resource must not be pending to save
7070
}
7171

72-
if (resource.scheme !== Schemas.untitled && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY && !fileModel?.hasState(TextFileEditorModelState.ERROR)) {
72+
if (resource.scheme !== Schemas.untitled && this.filesConfigurationService.getAutoSaveMode(resource) === AutoSaveMode.AFTER_SHORT_DELAY && !fileModel?.hasState(TextFileEditorModelState.ERROR)) {
7373
// leave models auto saved after short delay unless
7474
// the save resulted in an error and not for untitled
7575
// that are not auto-saved anyway

src/vs/workbench/contrib/files/browser/files.contribution.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,27 @@ configurationRegistry.registerConfiguration({
250250
nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'files.autoSave.onWindowChange' }, "An editor with changes is automatically saved when the window loses focus.")
251251
],
252252
'default': isWeb ? AutoSaveConfiguration.AFTER_DELAY : AutoSaveConfiguration.OFF,
253-
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSave' }, "Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.", AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE, AutoSaveConfiguration.AFTER_DELAY)
253+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSave' }, "Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.", AutoSaveConfiguration.OFF, AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE, AutoSaveConfiguration.AFTER_DELAY),
254+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
254255
},
255256
'files.autoSaveDelay': {
256257
'type': 'number',
257258
'default': 1000,
258259
'minimum': 0,
259-
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveDelay' }, "Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.", AutoSaveConfiguration.AFTER_DELAY)
260+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveDelay' }, "Controls the delay in milliseconds after which an editor with unsaved changes is saved automatically. Only applies when `#files.autoSave#` is set to `{0}`.", AutoSaveConfiguration.AFTER_DELAY),
261+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
262+
},
263+
'files.autoSaveWorkspaceFilesOnly': {
264+
'type': 'boolean',
265+
'default': false,
266+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveWorkspaceFilesOnly' }, "When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that are inside the opened workspace. Only applies when `#files.autoSave#` is enabled."),
267+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
268+
},
269+
'files.autoSaveWhenNoErrors': {
270+
'type': 'boolean',
271+
'default': false,
272+
'markdownDescription': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'autoSaveWhenNoErrors' }, "When enabled, will limit [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors to files that have no errors reported in them. Only applies when `#files.autoSave#` is enabled."),
273+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
260274
},
261275
'files.watcherExclude': {
262276
'type': 'object',

src/vs/workbench/contrib/files/browser/views/openEditorsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ export class OpenEditorsView extends ViewPane {
460460
private updateDirtyIndicator(workingCopy?: IWorkingCopy): void {
461461
if (workingCopy) {
462462
const gotDirty = workingCopy.isDirty();
463-
if (gotDirty && !(workingCopy.capabilities & WorkingCopyCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
463+
if (gotDirty && !(workingCopy.capabilities & WorkingCopyCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode(workingCopy.resource) === AutoSaveMode.AFTER_SHORT_DELAY) {
464464
return; // do not indicate dirty of working copies that are auto saved after short delay
465465
}
466466
}

src/vs/workbench/contrib/files/common/dirtyFilesIndicator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class DirtyFilesIndicator extends Disposable implements IWorkbenchContrib
4242

4343
private onWorkingCopyDidChangeDirty(workingCopy: IWorkingCopy): void {
4444
const gotDirty = workingCopy.isDirty();
45-
if (gotDirty && !(workingCopy.capabilities & WorkingCopyCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
45+
if (gotDirty && !(workingCopy.capabilities & WorkingCopyCapabilities.Untitled) && this.filesConfigurationService.getAutoSaveMode(workingCopy.resource) === AutoSaveMode.AFTER_SHORT_DELAY) {
4646
return; // do not indicate dirty of working copies that are auto saved after short delay
4747
}
4848

src/vs/workbench/contrib/files/test/browser/editorAutoSave.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as assert from 'assert';
77
import { Event } from 'vs/base/common/event';
88
import { ensureNoDisposablesAreLeakedInTestSuite, toResource } from 'vs/base/test/common/utils';
99
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
10-
import { TestFilesConfigurationService, workbenchInstantiationService, TestServiceAccessor, registerTestFileEditor, createEditorPart, TestEnvironmentService, TestFileService } from 'vs/workbench/test/browser/workbenchTestServices';
10+
import { TestFilesConfigurationService, workbenchInstantiationService, TestServiceAccessor, registerTestFileEditor, createEditorPart, TestEnvironmentService, TestFileService, TestTextResourceConfigurationService } from 'vs/workbench/test/browser/workbenchTestServices';
1111
import { ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles';
1212
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
1313
import { DisposableStore } from 'vs/base/common/lifecycle';
@@ -21,7 +21,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
2121
import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
2222
import { DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor';
2323
import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace';
24-
import { TestContextService } from 'vs/workbench/test/common/workbenchTestServices';
24+
import { TestContextService, TestMarkerService } from 'vs/workbench/test/common/workbenchTestServices';
2525
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
2626
import { IAccessibleNotificationService } from 'vs/platform/accessibility/common/accessibility';
2727
import { TestAccessibleNotificationService } from 'vs/workbench/contrib/accessibility/browser/accessibleNotificationService';
@@ -51,7 +51,9 @@ suite('EditorAutoSave', () => {
5151
new TestContextService(TestWorkspace),
5252
TestEnvironmentService,
5353
disposables.add(new UriIdentityService(disposables.add(new TestFileService()))),
54-
disposables.add(new TestFileService())
54+
disposables.add(new TestFileService()),
55+
new TestMarkerService(),
56+
new TestTextResourceConfigurationService(configurationService)
5557
)));
5658

5759
const part = await createEditorPart(instantiationService, disposables);

0 commit comments

Comments
 (0)