vscode自定义主题语法及流程

news2025/6/7 17:45:44

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.coloradmin.cn/o/2403179.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

vue中加载Cesium地图(天地图、高德地图)

目录 1、将下载的Cesium包移动至public下 2、首先需要将Cesium.js和widgets.css文件引入到 3、 新建Cesium.js文件&#xff0c;方便在全局使用 4、新建cesium.vue文件&#xff0c;展示三维地图 1、将下载的Cesium包移动至public下 npm install cesium后​​​​​​​ 2、…

SpringBoot整合RocketMQ与客户端注意事项

SpringBoot整合RocketMQ 引入依赖&#xff08;5.3.0比较稳定&#xff09; <dependencies><dependency><groupId>org.apache.rocketmq</groupId><artifactId>rocketmq-spring-boot-starter</artifactId><version>2.3.1</version&…

Mysql的卸载与安装

确保卸载干净mysql 不然在进行mysal安装时候会出现不一的页面和问题 1、卸载 在应用页面将查询到的mysql相关应用卸载 2、到c盘下将残留的软件包进行数据删除 3、删除programData下的mysql数据 4、检查系统中的mysql是否存在 cmd中执行 sc deleted mysql80 5、删除注册表中的…

Excel处理控件Aspose.Cells教程:使用 C# 在 Excel 中创建组合图表

可视化项目时间线对于有效规划和跟踪至关重要。在本篇教程中&#xff0c;您将学习如何使用 C# 在 Excel 中创建组合图。只需几行代码&#xff0c;即可自动生成动态、美观的组合图。无论您是在构建项目管理工具还是处理内部报告&#xff0c;本指南都将向您展示如何将任务数据转换…

【多线程初阶】阻塞队列 生产者消费者模型

文章目录 一、阻塞队列二、生产者消费者模型(一)概念(二)生产者消费者的两个重要优势(阻塞队列的运用)1) 解耦合(不一定是两个线程之间,也可以是两个服务器之间)2) 削峰填谷 (三)生产者消费者模型付出的代价 三、标准库中的阻塞队列(一)观察模型的运行效果(二)观察阻塞效果1) 队…

《100天精通Python——基础篇 2025 第5天:巩固核心知识,选择题实战演练基础语法》

目录 一、踏上Python之旅二、Python输入与输出三、变量与基本数据类型四、运算符五、流程控制 一、踏上Python之旅 1.想要输出 I Love Python,应该使用()函数。 A.printf() B.print() C.println() D.Print() 在Python中想要在屏幕中输出内容&#xff0c;应该使用print()函数…

机器人夹爪的选型与ROS通讯——机器人抓取系统基础系列(六)

文章目录 前言一、夹爪的选型1.1 任务需求分析1.2 软体夹爪的选型 二、夹爪的ROS通讯2.1 夹爪的通信方式介绍2.2 串口助手测试2.3 ROS通讯节点实现 总结Reference: 前言 本文将介绍夹爪的选型方法和通讯方式。以鞋子这类操作对象为例&#xff0c;将详细阐述了对应的夹爪选型过…

第二十八章 RTC——实时时钟

第二十八章 RTC——实时时钟​​​​​​​ 目录 第二十八章 RTC——实时时钟 1 RTC实时时钟简介 2 RTC外设框图剖析 3 UNIX时间戳 4 与RTC控制相关的库函数 4.1 等待时钟同步和操作完成 4.2 使能备份域涉及RTC配置 4.3 设置RTC时钟分频 4.4 设置、获取RTC计数器及闹钟 5 实时时…

使用 DuckLake 和 DuckDB 构建 S3 数据湖实战指南

本文介绍了由 DuckDB 和 DuckLake 组成的轻量级数据湖方案&#xff0c;旨在解决传统数据湖&#xff08;如HadoopHive&#xff09;元数据管理复杂、查询性能低及厂商锁定等问题。该方案为中小规模数据湖场景提供了简单、高性能且无厂商锁定的替代选择。 1. 什么是 DuckLake 和 D…

大语言模型提示词(LLM Prompt)工程系统性学习指南:从理论基础到实战应用的完整体系

文章目录 前言&#xff1a;为什么提示词工程成为AI时代的核心技能一、提示词的本质探源&#xff1a;认知科学与逻辑学的理论基础1.1 认知科学视角下的提示词本质信息处理理论的深层机制图式理论的实际应用认知负荷理论的优化策略 1.2 逻辑学框架下的提示词架构形式逻辑的三段论…

如何基于Mihomo Party http端口配置git与bash命令行代理

如何基于Mihomo Party http端口配置git与bash命令行代理 1. 确定Mihomo Party http端口配置 点击内核设置后即可查看 默认7892端口&#xff0c;开启允许局域网连接 2. 配置git代理 配置本机代理可以使用 127.0.0.1 配置局域网内其它机代理需要使用本机的非回环地址 IP&am…

埃文科技智能数据引擎产品入选《中国网络安全细分领域产品名录》

嘶吼安全产业研究院发布《中国网络安全细分领域产品名录》&#xff0c;埃文科技智能数据引擎产品成功入选数据分级分类产品名录。 在数字化转型加速的今天&#xff0c;网络安全已成为企业生存与发展的核心基石&#xff0c;为了解这一蓬勃发展的产业格局&#xff0c;嘶吼安全产业…

NLP学习路线图(二十六):自注意力机制

一、为何需要你&#xff1f;序列建模的困境 在你出现之前&#xff0c;循环神经网络&#xff08;RNN&#xff09;及其变种LSTM、GRU是处理序列数据&#xff08;如文本、语音、时间序列&#xff09;的主流工具。它们按顺序逐个处理输入元素&#xff0c;将历史信息压缩在一个隐藏…

Unity3D仿星露谷物语开发60之定制角色其他部位

1、目标 上一篇中定制了角色的衬衫、手臂。 本篇中将定制角色其他部位的图形&#xff0c;包括&#xff1a;裤子、发型、皮肤、帽子等。 2、定制裤子 &#xff08;1&#xff09;修改ApplyCharacterCustomisation.cs脚本 我们需要设置一个输入框选择裤子的颜色。 // Select …

Google机器学习实践指南(机器学习模型泛化能力)

&#x1f525; Google机器学习(14)-机器学习模型泛化能力解析 Google机器学习(14)-机器学习模型泛化原理与优化&#xff08;约10分钟&#xff09; 一、泛化问题引入 ▲ 模型表现对比&#xff1a; 假设森林中树木健康状况预测模型&#xff1a; 图1&#xff1a;初始模型表现 …

MySQL性能调优:Mysql8高频面试题汇总

1&#xff0c;主键和唯一键有什么区别&#xff1f; 主键不能重复&#xff0c;不能为空&#xff0c;唯一键不能重复&#xff0c;可以为空。 建立主键的目的是让外键来引用。 一个表最多只有一个主键&#xff0c;但可以有很多唯一键 2&#xff0c;MySQL常用的存储引擎有哪些&…

vue+elementUI+springboot实现文件合并前端展示文件类型

项目场景&#xff1a; element的table上传文件并渲染出文件名称点击所属行可以查看文件,并且可以导出合并文件,此文章是记录合并文档前端展示的帖子 解决方案&#xff1a; 后端定义三个工具类 分别是pdf,doc和word的excle的目前我没整 word的工具类 package com.sc.modules…

高效绘制业务流程图!专业模板免费下载

在复杂的业务流程管理中&#xff0c;可视化工具已成为提升效能的核心基础设施。为助力开发者、项目经理及业务架构师高效落地流程标准化&#xff0c;本文将为你精选5套开箱即用的专业流程图模板。这些模板覆盖跨部门协作、电商订单、客户服务等高频场景&#xff0c;具备以下核心…

Spring Boot + Prometheus 实现应用监控(基于 Actuator 和 Micrometer)

文章目录 Spring Boot Prometheus 实现应用监控&#xff08;基于 Actuator 和 Micrometer&#xff09;环境准备示例结构启动和验证验证 Spring Boot 应用Prometheus 抓取配置&#xff08;静态方式&#xff09;Grafana 面板配置总结 Spring Boot Prometheus 实现应用监控&…

PowerBI企业运营分析—列互换式中国式报表分析

PowerBI企业运营分析—列互换式中国式报表分析 欢迎来到Powerbi小课堂&#xff0c;在竞争激烈的市场环境中&#xff0c;企业运营分析平台成为提升竞争力的核心工具。 该平台通过高效整合多源数据&#xff0c;并实时监控关键指标&#xff0c;能够迅速揭示业务表现的全貌&#…