Skip to content

Instantly share code, notes, and snippets.

@ukoloff
Last active June 16, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukoloff/40f7b034ad69fc54aaff5b6af3f99c03 to your computer and use it in GitHub Desktop.
Save ukoloff/40f7b034ad69fc54aaff5b6af3f99c03 to your computer and use it in GitHub Desktop.
Minimal VSCode extension
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
var vscode = require('vscode')
exports.activate = activate
function activate(context) {
console.log("Hello, world!")
var disposable = vscode.commands.registerCommand('extension.sayHello', function () {
vscode.window.showInformationMessage('Hello World!')
})
context.subscriptions.push(disposable)
}
{
"name": "vscode-ext",
"private": true,
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"vscode": "^1.0.0"
},
"publisher": "ukoloff",
"repository": {
"type": "git",
"url": "git+https://ukoloff@github.com/ukoloff/win-ca.git"
},
"activationEvents": [
"onCommand:extension.sayHello"
],
"contributes": {
"commands": [
{
"command": "extension.sayHello",
"title": "Hello World"
}
]
},
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"vscode": "^1.1.18"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment