File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,11 @@ export default class CodeFormatManager {
69
69
} ) ,
70
70
71
71
// Format on save
72
- registerOnWillSave ( this . _onWillSaveProvider ( ) )
72
+ registerOnWillSave ( ( ) => ( {
73
+ priority : 0 ,
74
+ timeout : SAVE_TIMEOUT ,
75
+ callback : this . _formatCodeOnSaveInTextEditor . bind ( this ) ,
76
+ } ) )
73
77
)
74
78
75
79
this . _rangeProviders = new ProviderRegistry ( )
@@ -194,14 +198,6 @@ export default class CodeFormatManager {
194
198
}
195
199
}
196
200
197
- _onWillSaveProvider ( ) {
198
- return {
199
- priority : 0 ,
200
- timeout : SAVE_TIMEOUT ,
201
- callback : this . _formatCodeOnSaveInTextEditor . bind ( this ) ,
202
- }
203
- }
204
-
205
201
async _formatCodeOnSaveInTextEditor ( editor : TextEditor ) : Promise < TextEdit [ ] > {
206
202
const saveProviders = [ ...this . _onSaveProviders . getAllProvidersForEditor ( editor ) ]
207
203
if ( saveProviders . length > 0 ) {
You can’t perform that action at this time.
0 commit comments