@@ -21,6 +21,7 @@ import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeat
21
21
import { formatDocumentRangesWithSelectedProvider , formatDocumentWithSelectedProvider , FormattingMode , getOnTypeFormattingEdits } from 'vs/editor/contrib/format/browser/format' ;
22
22
import { FormattingEdit } from 'vs/editor/contrib/format/browser/formattingEdit' ;
23
23
import * as nls from 'vs/nls' ;
24
+ import { AccessibleNotificationEvent , IAccessibleNotificationService } from 'vs/platform/accessibility/common/accessibility' ;
24
25
import { CommandsRegistry , ICommandService } from 'vs/platform/commands/common/commands' ;
25
26
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
26
27
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
@@ -38,7 +39,8 @@ export class FormatOnType implements IEditorContribution {
38
39
constructor (
39
40
private readonly _editor : ICodeEditor ,
40
41
@ILanguageFeaturesService private readonly _languageFeaturesService : ILanguageFeaturesService ,
41
- @IEditorWorkerService private readonly _workerService : IEditorWorkerService
42
+ @IEditorWorkerService private readonly _workerService : IEditorWorkerService ,
43
+ @IAccessibleNotificationService private readonly _accessibleNotificationService : IAccessibleNotificationService
42
44
) {
43
45
this . _disposables . add ( _languageFeaturesService . onTypeFormattingEditProvider . onDidChange ( this . _update , this ) ) ;
44
46
this . _disposables . add ( _editor . onDidChangeModel ( ( ) => this . _update ( ) ) ) ;
@@ -141,6 +143,7 @@ export class FormatOnType implements IEditorContribution {
141
143
return ;
142
144
}
143
145
if ( isNonEmptyArray ( edits ) ) {
146
+ this . _accessibleNotificationService . notify ( AccessibleNotificationEvent . Format ) ;
144
147
FormattingEdit . execute ( this . _editor , edits , true ) ;
145
148
}
146
149
} ) . finally ( ( ) => {
0 commit comments