{
"name": "helloworld",
"displayName": "HelloWorld",
"description": "LEAVE BLANK",
"version": "0.0.1",
"engines": {
"vscode": "^1.53.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:helloworld.helloWorld"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "helloworld.helloWorld",
"title": "Hello World"
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/vscode": "^1.53.0",
"@types/glob": "^7.1.3",
"@types/mocha": "^8.0.4",
"@types/node": "^12.11.7",
"eslint": "^7.19.0",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"glob": "^7.1.6",
"mocha": "^8.2.1",
"typescript": "^4.1.3",
"vscode-test": "^1.5.0"
}
}
activationEvents(激活插件的方式)
onLanguage
onCommand(命令激活)
{
//当输入helloworld.helloWorld命令时,则激活此扩展
"activationEvents":["onCommand:helloworld.helloWorld"]
}
onDebug
onDebugInitialConfigurations
onDebugResolve
workspaceContains
onFileSystem
onView
onUri
onWebviewPanel
onCustomEditor
*
onStartupFinished
contributes
commands(命令)
{
"contributes":{
"commands":[{
"command": "helloworld.helloWorld",
//ctrl+shift+P 打开的命令行会出现这个命令,选择后执行helloworld.helloWorld命令
"title": "Hello World",
}]
}
}
keybindings(键绑定)
{
"contributes":{
"keybindings":[{
"command": "helloworld.helloWorld",
//按下ctrl+F1时触发helloworld.helloWorld命令
"key": "ctrl+f1",
}]
}
}