extension.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // The module 'vscode' contains the VS Code extensibility API
  2. // Import the module and reference it with the alias vscode in your code below
  3. const vscode = require('vscode');
  4. // this method is called when your extension is activated
  5. // your extension is activated the very first time the command is executed
  6. /**
  7. * @param {vscode.ExtensionContext} context
  8. */
  9. function activate(context) {
  10. // Use the console to output diagnostic information (console.log) and errors (console.error)
  11. // This line of code will only be executed once when your extension is activated
  12. console.log('Congratulations, your extension "fastmd" is now active!');
  13. // The command has been defined in the package.json file
  14. // Now provide the implementation of the command with registerCommand
  15. // The commandId parameter must match the command field in package.json
  16. let disposable = vscode.commands.registerCommand('extension.helloWorld', function () {
  17. // The code you place here will be executed every time your command is executed
  18. // Display a message box to the user
  19. vscode.window.showInformationMessage('Hello New World!');
  20. });
  21. context.subscriptions.push(disposable);
  22. }
  23. exports.activate = activate;
  24. // this method is called when your extension is deactivated
  25. function deactivate() {}
  26. module.exports = {
  27. activate,
  28. deactivate
  29. }