vscode插件开发指南(1)

vscode官网插件开发文档

前言

vscode是基于ts开发的编辑器,vscode插件开发可以用js或者ts开发

安装依赖

安装Yeoman和VS Code Extension Generator:

npm install -g yo generator-code

初始化一个vscode插件项目

yo code

? What type of extension do you want to create? New Extension (TypeScript)
? What's the name of your extension? HelloWorld
? What's the identifier of your extension? helloworld
? What's the description of your extension? HelloWorld
? Initialize a git repository? No
? Which package manager to use? npm
等待安装依赖完成
code ./helloworld

运行项目

在vscode中打开项目,按F5启动,vscode会弹出一个扩展开发机在扩展开发机里面 就拥有这个插件 ctrl + shift + p 输入helloworld运行你的插件命令,在扩展开发机会弹出一个信息hello world!插件的功能算是打通了

你可能感兴趣的:(vscode插件开发指南(1))