@@ -12,19 +12,13 @@ export function initTokenColorCustomizations(context: vscode.ExtensionContext) {
1212 // vscode.window.showInformationMessage(JSON.stringify("active"));
1313 const document = editor ?. document ; // `editor` can be `undefined`!
1414 update ( packageJSON ( document ) || jsonTextMate ( document ) ) ;
15- } )
16- ) ;
17-
18- context . subscriptions . push (
15+ } ) ,
1916 vscode . workspace . onDidOpenTextDocument ( ( document : vscode . TextDocument ) => {
2017 // vscode.window.showInformationMessage(JSON.stringify("open"));
2118 if ( document == vscode . window . activeTextEditor ?. document ) { // `activeTextEditor` can be `undefined`!
2219 update ( packageJSON ( document ) || jsonTextMate ( document ) ) ;
2320 }
24- } )
25- ) ;
26-
27- context . subscriptions . push (
21+ } ) ,
2822 vscode . workspace . onDidChangeTextDocument ( ( edits : vscode . TextDocumentChangeEvent ) => {
2923 // vscode.window.showInformationMessage(JSON.stringify("change"));
3024 if ( edits . contentChanges . length == 0 ) {
@@ -36,26 +30,20 @@ export function initTokenColorCustomizations(context: vscode.ExtensionContext) {
3630 update ( packageJSON ( document ) ) ;
3731 }
3832 }
39- } )
40- ) ;
41-
42- // context.subscriptions.push(
43- // vscode.workspace.onDidChangeConfiguration((event: vscode.ConfigurationChangeEvent) => {
44- // // vscode.window.showInformationMessage(JSON.stringify("config"));
45- // if (event.affectsConfiguration("editor.tokenColorCustomizations")) {
46- // const document = vscode.window.activeTextEditor?.document; // `activeTextEditor` can be `undefined`!
47- // update(packageJSON(document) || jsonTextMate(document));
48- // }
49- // })
50- // );
51-
52- context . subscriptions . push (
33+ } ) ,
34+ // vscode.workspace.onDidChangeConfiguration((event: vscode.ConfigurationChangeEvent) => {
35+ // // vscode.window.showInformationMessage(JSON.stringify("config"));
36+ // if (event.affectsConfiguration("editor.tokenColorCustomizations")) {
37+ // const document = vscode.window.activeTextEditor?.document; // `activeTextEditor` can be `undefined`!
38+ // update(packageJSON(document) || jsonTextMate(document));
39+ // }
40+ // }),
5341 vscode . workspace . onDidCloseTextDocument ( ( document : vscode . TextDocument ) => {
5442 // vscode.window.showInformationMessage(JSON.stringify("close"));
5543 if ( document == vscode . window . activeTextEditor ?. document ) { // `activeTextEditor` can be `undefined`!
5644 update ( undefined ) ;
5745 }
58- } )
46+ } ) ,
5947 ) ;
6048}
6149
0 commit comments