INNER CODE UNIT · TypeScript
activate
bioSyntax/bioSyntax · vscode/src/extension.ts:7
export function activate(context: vscode.ExtensionContext) {
let autoTheme = vscode.workspace.getConfiguration().get("BioSyntax.autoSwitchTheme");
let activeEditor = vscode.window.activeTextEditor;
if(activeEditor){
updateDecorations();
}
vscode.window.onDidChangeActiveTextEditor(editor => {
activeEditor = editor;
if (editor) {
updateDecorations();
}
}, null, context.subscriptions);
vscode.workspace.onDidChangeTextDocument(event => {
if (activeEditor && event.document === activeEditor.document) {
updateDecorations();