• 周五. 4 月 24th, 2026

物嫩软件资讯网

软件资讯来物嫩

vscode插件开发(2)-主题插件

admin@wunen

4 月 24, 2025



创建


What type of extension do you want to create?

:New Color Theme


Do you want to import or convert an existing Textmate color theme?

:是否导入已经存在的主题文件


What's the name of your extension?

:扩展插件的名字


What's the identifier of your extension?

:扩展的标志(也是接下来创建的扩展项目文件夹名)


What's the description of your extension?

:主题扩展的描述


What's the name of your theme shown to the user?

:用户看到的名字


Select a base theme

:创建的主题是深色、浅色、还是高对比度的,选择后会根据主题默认提供一部分颜色,基于它再进行扩展

这是我选择的配置项:



目录结构

  • .vscode

    • launch.json
  • themes

    • mytheme-color-theme.json:配置插件入口文件
  • .vscodeignore:配置不需要加入最终发布到扩展中的文件
  • CHANGELOG.md:变更记录
  • package.json:资源配置文件
  • READE.md
  • vsc-extension.quickstart.md
  • LICENSE:生成的文件目录是没有license文件的,发布需要有license这里创建了一个



package.json

{
   
	//扩展名-应该全部为小写字母,没有空格
    "name": "girls-theme",
    //扩展在市场中显示的名称
    "displayName": "Cool-girls-theme",
    //扩展的说明
    "description": "a cool pink theme for girls",
    //版本号
    "version": "0.0.1",
    //插件在市场中显示的icon图标
    "icon": "icon.png",
    

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注