当前位置: 首页 > article >正文

vscode自定义主题语法及流程

vscode c/c++ 主题 DIY

启用自己的主题(最后步骤)

重启生效
在这里插入图片描述

手把手教你制作

在C:\Users\jlh.vscode\extensions下自己创建一个文件夹
在这里插入图片描述
里面有两个文件一个文件夹
在这里插入图片描述

package.json:

{"name":"theme-jlh","displayName":"%displayName%","description":"%description%","version":"1.0.0","publisher":"vscode","license":"MIT","engines":{"vscode":"*"},"categories":["Themes"],"contributes":{"themes":[{"id":"JLH","label":"%themeLabel%","uiTheme":"vs-dark","path":"./themes/jlh-color-theme.json"}]},"repository":{"type":"git","url":"https://github.com/microsoft/vscode.git"}}

package.nls.json:

{"displayName":"JLH Theme","description":"JLH theme for Visual Studio Code","themeLabel":"JLH"}

themes/jlh-color-theme.json

{"$schema": "vscode://schemas/color-theme","name": "jlh diy theme(c/c++)","colors": {"editor.background": "#1E1E1E","editor.foreground": "#DADADA","editor.inactiveSelectionBackground": "#3A3D41","editorIndentGuide.background": "#404040","editorIndentGuide.activeBackground": "#707070","editor.selectionHighlightBackground": "#ADD6FF26","list.dropBackground": "#383B3D","activityBarBadge.background": "#007ACC","sideBarTitle.foreground": "#BBBBBB","input.placeholderForeground": "#A6A6A6","menu.background": "#303031","menu.foreground": "#CCCCCC","statusBarItem.remoteForeground": "#FFF","statusBarItem.remoteBackground": "#16825D","ports.iconRunningProcessForeground": "#369432","sideBarSectionHeader.background": "#0000","sideBarSectionHeader.border": "#ccc3","tab.lastPinnedBorder": "#ccc3","list.activeSelectionIconForeground": "#FFF","editorLineNumber.foreground": "#2b91af","editorLineNumber.activeForeground": "#2b91af","terminal.inactiveSelectionBackground": "#3A3D41","editorInlayHint.background": "#3E3E3E","editorInlayHint.foreground": "#A9A8A7"},"tokenColors": [{"scope": ["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown",],"settings": {"foreground": "#D4D4D4"}},{"scope": "emphasis","settings": {"fontStyle": "italic"}},{"scope": "strong","settings": {"fontStyle": "bold"}},{"scope": "header","settings": {"foreground": "#000080"}},{"scope": "comment","settings": {"foreground": "#6A9955"}},{"scope": "constant.language","settings": {"foreground": "#569cd6"}},{"scope": ["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings": {"foreground": "#b5cea8"}},{"scope": "constant.regexp","settings": {"foreground": "#646695"}},{"scope": "entity.name.tag","settings": {"foreground": "#569cd6"}},{"scope": "entity.name.tag.css","settings": {"foreground": "#d7ba7d"}},{"scope": "entity.other.attribute-name","settings": {"foreground": "#9cdcfe"}},{"scope": ["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings": {"foreground": "#d7ba7d"}},{"scope": "invalid","settings": {"foreground": "#f44747"}},{"scope": "markup.underline","settings": {"fontStyle": "underline"}},{"scope": "markup.bold","settings": {"fontStyle": "bold","foreground": "#569cd6"}},{"scope": "markup.heading","settings": {"fontStyle": "bold","foreground": "#569cd6"}},{"scope": "markup.italic","settings": {"fontStyle": "italic"}},{"scope": "markup.strikethrough","settings": {"fontStyle": "strikethrough"}},{"scope": "markup.inserted","settings": {"foreground": "#b5cea8"}},{"scope": "markup.deleted","settings": {"foreground": "#ce9178"}},{"scope": "markup.changed","settings": {"foreground": "#569cd6"}},{"scope": "punctuation.definition.quote.begin.markdown","settings": {"foreground": "#6A9955"}},{"scope": "punctuation.definition.list.begin.markdown","settings": {"foreground": "#6796e6"}},{"scope": "markup.inline.raw","settings": {"foreground": "#ce9178"}},{"name": "brackets of XML/HTML tags","scope": "punctuation.definition.tag","settings": {"foreground": "#808080"}},{"scope": ["meta.preprocessor","entity.name.function.preprocessor"],"settings": {"foreground": "#569cd6"}},{"scope": "meta.preprocessor.string","settings": {"foreground": "#ce9178"}},{"scope": "meta.preprocessor.numeric","settings": {"foreground": "#b5cea8"}},{"scope": "meta.structure.dictionary.key.python","settings": {"foreground": "#9cdcfe"}},{"scope": "meta.diff.header","settings": {"foreground": "#569cd6"}},{"scope": "storage","settings": {"foreground": "#569cd6"}},{"scope": "storage.type","settings": {"foreground": "#569cd6"}},{"scope": ["storage.modifier","keyword.operator.noexcept"],"settings": {"foreground": "#569cd6"}},{"scope": ["string","meta.embedded.assembly"],"settings": {"foreground": "#ce9178"}},{"scope": "string.tag","settings": {"foreground": "#ce9178"}},{"scope": "string.value","settings": {"foreground": "#ce9178"}},{"scope": "string.regexp","settings": {"foreground": "#d16969"}},{"name": "String interpolation","scope": ["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings": {"foreground": "#569cd6"}},{"name": "Reset JavaScript string interpolation expression","scope": ["meta.template.expression"],"settings": {"foreground": "#d4d4d4"}},{"scope": ["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],"settings": {"foreground": "#9cdcfe"}},{"scope": "keyword","settings": {"foreground": "#569cd6"}},{"scope": "keyword.control","settings": {"foreground": "#569cd6"}},{"scope": "keyword.operator","settings": {"foreground": "#d4d4d4"}},{"scope": ["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings": {"foreground": "#569cd6"}},{"scope": "keyword.other.unit","settings": {"foreground": "#b5cea8"}},{"scope": ["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings": {"foreground": "#569cd6"}},{"scope": "support.function.git-rebase","settings": {"foreground": "#9cdcfe"}},{"scope": "constant.sha.git-rebase","settings": {"foreground": "#b5cea8"}},{"name": "coloring of the Java import and package identifiers","scope": ["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings": {"foreground": "#d4d4d4"}},{"name": "this.self","scope": "variable.language","settings": {"foreground": "#569cd6"}},//===================关键字================={"scope": "keyword.control.c","settings": {"foreground": "#2b71f1"  // 控制语句关键字(如 if、else、for 等)}},{"scope": "keyword.control.cpp","settings": {"foreground": "#2b71f1"  // C++ 控制语句关键字}},{"scope": "keyword.operator.word.c","settings": {"foreground": "#2b71f1"  // 操作符关键字(如 sizeof、typedef 等)}},{"scope": "keyword.operator.logical.c","settings": {"foreground": "#ff0000"  // 逻辑操作符关键字(如 &&、|| 等)}},//===================字符串================={"scope": "string.quoted.double.cpp","settings": {"foreground": "#44e9ff"  // 双引号字符串}},{"scope": "string.quoted.single.cpp","settings": {"foreground": "#7bf0ff"  // 单引号字符串}},{"scope": "string.quoted.other.cpp","settings": {"foreground": "#44e9ff"  // 其他类型的字符串}},//===================函数================={"scope": "entity.name.function.c","settings": {"foreground": "#fcff54"  // C 函数名}},{"scope": "entity.name.function.cpp","settings": {"foreground": "#fcff54"  // C++ 函数名}},{"scope": "meta.function-call.c","settings": {"foreground": "#d580f7"  // 函数调用名}},{"scope": "variable.parameter","settings": {"foreground": "#ffd588"  // 函数参数}},//=================== 宏 ================={"scope": "keyword.other.macro.c","settings": {"foreground": "#ff0000"  // 宏定义}},{"scope": "keyword.other.macro.cpp","settings": {"foreground": "#ec0f0f"  // C++ 宏定义}},//===================注释================={"scope": "comment.line.double-slash.c","settings": {"foreground": "#5acf5a7e"  // 单行注释}},{"scope": "comment.block.c","settings": {"foreground": "#5acf5a7e"  // 多行注释}},//===================枚举================={"scope": "entity.name.type.enum.c","settings": {"foreground": "#2b71f1"  // 枚举类型名}},{"scope": "constant.other.enum-member.c","settings": {"foreground": "#f0d08c"  // 枚举成员}},//===================指针运算符================={"scope": "storage.modifier.pointer.c","settings": {"foreground": "#e28df3"  // 指针运算符(* 和 &)}},//===================class================={"scope": "entity.name.type.class.cpp","settings": {"foreground": "#2b71f1"  // C++ 类名}},{"scope": "entity.name.type.struct.c","settings": {"foreground": "#2b71f1"  // C 结构体名}},{"scope": "entity.name.type.struct.cpp","settings": {"foreground": "#2b71f1"  // C++ 结构体名}},//===================变量================={"scope": "storage.type.c","settings": {"foreground": "#21c937"  // 类型关键字(如 int、float 等)}},{"scope": "variable.other.readwrite.c","settings": {"foreground": "#bbd1fa"  // 普通变量}},//===================运算符================={"scope": "keyword.operator.arithmetic.c","settings": {"foreground": "#f7f3f3"  // 算术运算符(如 +、-、*、/ 等)}},{"scope": "keyword.operator.comparison.c","settings": {"foreground": "#f7f3f3"  // 比较运算符(如 ==、!=、<、> 等)}},{"scope": "keyword.operator.assignment.c","settings": {"foreground": "#f7f3f3"  // 赋值运算符(如 =、+=、-= 等)}},//===================常量================={"scope": "constant.numeric.integer.c","settings": {"foreground": "#B5CEA8"  // 整数常量}},{"scope": "constant.numeric.float.c","settings": {"foreground": "#B5CEA8"  // 浮点数常量}},{"scope": "constant.character.escape.c","settings": {"foreground": "#CE9178"  // 字符串中的转义字符}}],"semanticHighlighting": true,"semanticTokenColors": {"newOperator": "#569CD6","stringLiteral": "#ce9178","customLiteral": "#DCDCAA","numberLiteral": "#b5cea8"//数字颜色},
/*"editor.semanticTokenColorCustomizations": {"rules": {"namespace": {"foreground": "#569CD6"  // 命名空间},"class": {"foreground": "#4EC9B0"  // 类},"interface": {"foreground": "#4EC9B0"  // 接口},"enum": {"foreground": "#4EC9B0"  // 枚举},"enumMember": {"foreground": "#569CD6"  // 枚举成员},"struct": {"foreground": "#4EC9B0"  // 结构体},"typeParameter": {"foreground": "#9CDCFE"  // 类型参数},"function": {"foreground": "#DCDCAA"  // 函数},"method": {"foreground": "#569CD6"  // 方法},"variable": {"foreground": "#9CDCFE"  // 变量},"parameter": {"foreground": "#9CDCFE"  // 参数},"property": {"foreground": "#9CDCFE"  // 属性},"macro": {"foreground": "#FFD700"  // 宏}}}*/
}
http://www.lryc.cn/news/2403179.html

相关文章:

  • vue中加载Cesium地图(天地图、高德地图)
  • SpringBoot整合RocketMQ与客户端注意事项
  • Github 2025-06-04 C开源项目日报 Top7
  • 大二下期末
  • LeetCode 热题 100 74. 搜索二维矩阵
  • 解决 VSCode 中无法识别 Node.js 的问题
  • Mysql的卸载与安装
  • ES101系列09 | 运维、监控与性能优化
  • Java常用的判空方法
  • Excel处理控件Aspose.Cells教程:使用 C# 在 Excel 中创建组合图表
  • 【多线程初阶】阻塞队列 生产者消费者模型
  • 《100天精通Python——基础篇 2025 第5天:巩固核心知识,选择题实战演练基础语法》
  • 机器人夹爪的选型与ROS通讯——机器人抓取系统基础系列(六)
  • 第二十八章 RTC——实时时钟
  • 使用 DuckLake 和 DuckDB 构建 S3 数据湖实战指南
  • 大语言模型提示词(LLM Prompt)工程系统性学习指南:从理论基础到实战应用的完整体系
  • 如何基于Mihomo Party http端口配置git与bash命令行代理
  • CMake 为 Debug 版本的库或可执行文件添加 d 后缀
  • Linux 特殊权限位详解:SetUID, SetGID, Sticky Bit
  • 埃文科技智能数据引擎产品入选《中国网络安全细分领域产品名录》
  • 使用VTK还是OpenGL集成到qt程序里哪个好?
  • Java-IO流之打印流详解
  • 高效图像处理:使用 Pillow 进行格式转换与优化
  • Github 2025-06-06 Java开源项目日报Top10
  • 使用 Ansible 在 Windows 服务器上安装 SSL 证书
  • 厂区能源监控系统:网关赋能下的高效能源管理与环保监测
  • CentOS 7 如何安装llvm-project-10.0.0?
  • Cursor 1.0 的核心功能亮点及技术价值分析
  • 软考 系统架构设计师系列知识点之杂项集萃(83)
  • NLP学习路线图(二十六):自注意力机制