import { commands, ExtensionContext, languages } from "vscode"; import { ZoteroCodeLensProvider } from "./zoteroCodeLensProvider"; import { openZoteroPDF, showInZotero } from "./commands"; export function activate(context: ExtensionContext) { // Register the command let commandDisposable2 = commands.registerCommand( "zoterolens.showInZotero", showInZotero ); let commandDisposable3 = commands.registerCommand( "zoterolens.openZoteroPDF", openZoteroPDF ); // Get a document selector for the CodeLens provider // This one is any file that has the language of javascript let docSelector = { language: "markdown", scheme: "file" }; // Register our CodeLens provider let codeLensProviderDisposable = languages.registerCodeLensProvider( docSelector, new ZoteroCodeLensProvider() ); // Push the command and CodeLens provider to the context so it can be disposed of later context.subscriptions.push(commandDisposable2); context.subscriptions.push(commandDisposable3); context.subscriptions.push(codeLensProviderDisposable); } export function deactivate() {}