File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export class ConfigService implements IDisposable {
9
9
public config : Config ;
10
10
11
11
public onConfigChange :
12
- | ( ( this : ConfigService , config : ConfigurationChangeEvent ) => void )
12
+ | ( ( this : ConfigService , config : ConfigurationChangeEvent ) => Promise < void > )
13
13
| undefined ;
14
14
15
15
constructor ( ) {
@@ -22,10 +22,10 @@ export class ConfigService implements IDisposable {
22
22
this . _disposables . push ( disposeChangeListener ) ;
23
23
}
24
24
25
- private onVscodeCon
8000
figChange ( event : ConfigurationChangeEvent ) : void {
25
+ private async onVscodeConfigChange ( event : ConfigurationChangeEvent ) : Promise < void > {
26
26
if ( event . affectsConfiguration ( ConfigService . _namespace ) ) {
27
27
this . config . refresh ( ) ;
28
- this . onConfigChange ?.( event ) ;
28
+ await this . onConfigChange ?.( event ) ;
29
29
}
30
30
}
31
31
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export async function activate(context: ExtensionContext) {
244
244
} ) ;
245
245
} ) ;
246
246
247
- configService . onConfigChange = function onConfigChange ( event ) {
247
+ configService . onConfigChange = async function onConfigChange ( event ) {
248
248
let settings = this . config . toLanguageServerConfig ( ) ;
249
249
updateStatsBar ( this . config . enable ) ;
250
250
@@ -257,10 +257,9 @@ export async function activate(context: ExtensionContext) {
257
257
client . clientOptions . synchronize . fileEvents = createFileEventWatchers ( configService . config . configPath ) ;
258
258
259
259
if ( client . isRunning ( ) ) {
260
- client . restart ( ) . then ( async ( ) => {
261
- const configFiles = await findOxlintrcConfigFiles ( ) ;
262
- await sendDidChangeWatchedFilesNotificationWith ( client , configFiles ) ;
263
- } ) ;
260
+ await client . restart ( ) ;
261
+ const configFiles = await findOxlintrcConfigFiles ( ) ;
262
+ await sendDidChangeWatchedFilesNotificationWith ( client , configFiles ) ;
264
263
}
265
264
}
266
265
} ;
You can’t perform that action at this time.
0 commit comments