您现在的位置是:首页 >技术交流 >c语言样式主题 清爽风格 代码色彩 keil风格 适合单片机开发GD32 STM32等 cursor或者vscode 的settings.json文件网站首页技术交流
c语言样式主题 清爽风格 代码色彩 keil风格 适合单片机开发GD32 STM32等 cursor或者vscode 的settings.json文件
简介c语言样式主题 清爽风格 代码色彩 keil风格 适合单片机开发GD32 STM32等 cursor或者vscode 的settings.json文件
c语言样式主题 清爽风格 代码色彩 keil风格 适合单片机开发GD32 STM32等 cursor或者vscode 的settings.json文件
如上图,是不是和keil mdk很相近。
代码色彩,简单,配合 // 设置工作台主题为 Visual Studio 2017 Light - C++
主题使用, 代码紧凑,不干扰视觉,清爽,。 让你专注于代码。
下面 是 cursor或者vscode 的settings.json的配置文件
{
// 启用命令中心
"window.commandCenter": 1,
// 设置 CMake 选项在状态栏中的显示模式为图标
"cmake.options.statusBarVisibility": "icon",
// CMake 高级选项配置:build、launch、debug 均继承默认的“visible”设置
"cmake.options.advanced": {
"build": {
"statusBarVisibility": "inherit", // 继承上级设置
"inheritDefault": "visible" // 默认显示
},
"launch": {
"statusBarVisibility": "inherit",
"inheritDefault": "visible"
},
"debug": {
"statusBarVisibility": "inherit",
"inheritDefault": "visible"
}
},
// 设置工作台主题为 Visual Studio 2017 Light - C++
"workbench.colorTheme": "Visual Studio 2017 Light - C++",
// 编辑器字体大小设置为 12
"editor.fontSize": 12,
"editor.fontFamily": "'宋体', '微软雅黑VictorMano', monospace",
// 设置文件编码为 gb2312,并启用自动猜测编码
"files.encoding": "gb2312",
"files.autoGuessEncoding": true,
// 自定义编辑器语法高亮颜色
"editor.tokenColorCustomizations": {
"textMateRules": [
{
// 通用注释(comment)样式
"scope": "comment",
"settings": {
"foreground": "#ffcbd3"
}
},
{
// 双斜杠(//)行注释样式
"scope": "comment.line.double-slash",
"settings": {
"foreground": "#ffcad3"
}
},
{
// 块注释样式
"scope": "comment.block",
"settings": {
"foreground": "#ffc5cf"
}
},
{
// 文档注释(block documentation)样式
"scope": "comment.block.documentation",
"settings": {
"foreground": "#ffcfd7"
}
},
{
// 数值常量样式:将数值常量显示为红色
"scope": "constant.numeric",
"settings": {
"foreground": "#4e4c4c"
}
},
{
// 函数参数样式
"scope": "variable.parameter",
"settings": {
"foreground": "#000000"
}
},
{
// 控制关键词,如 if、else、for、while 等
"scope": [
"keyword.control",
"keyword.control.conditional",
"keyword.control.loop"
],
"settings": {
"foreground": "#1a1dbe"
}
},
{
// 预处理器定义(例如 #define)的样式
"scope": "meta.preprocessor.define",
"settings": {
"foreground": "#008000"
}
},
{
// 预处理器中局部变量的样式
"scope": "variable.other.local.preprocessor",
"settings": {
"foreground": "#008000"
}
},
{
// 数据类型相关的样式(存储类型、支持类型、类型名称等)
"scope": [
"storage.type",
"support.type",
"entity.name.type",
"meta.type"
],
"settings": {
"foreground": "#000000"
}
},
{
// 其他关键词,如类型、数据、原始类型等
"scope": [
"keyword.other",
"keyword.other.type",
"keyword.other.data",
"keyword.other.primitive"
],
"settings": {
"foreground": "#1a1dbe"
}
},
{
// 其他常量的样式:将其他常量显示为红色
"scope": "constant.other",
"settings": {
"foreground": "#3b3b3b"
}
},
{
// 枚举常量(枚举值)的样式:将其前景色设置为橙色
"scope": "variable.other.enummember",
"settings": {
"foreground": "#0f530f"
}
},
{
// 宏名称或宏标识符样式:只设置前景色为绿色
"scope": [
"entity.name.function.preprocessor", // 常用于预处理器宏的名称
"entity.name.macro" // 另一种可能的宏名称范围
],
"settings": {
"fontStyle": "", // 设置加粗
"foreground": "#0f530f" // 设置绿色前景色
}
},
{
// 函数名称样式:加粗并显示为绿色(#0f530f)
"scope": "entity.name.function",
"settings": {
"fontStyle": "bold", // 设置加粗
"foreground": "#0f530f" // 设置为绿色
}
}
]
},
// 自定义工作台颜色配置
"workbench.colorCustomizations": {
// 括号匹配的背景、边框及前景色均设置为红色
"editorBracketMatch.background": "#FF0000",
"editorBracketMatch.border": "#FF0000",
"editorBracketMatch.fg": "#FF0000",
// 缩进参考线的颜色
"editorIndentGuide.background1": "#f0f0f0"
},
// 禁用括号配对着色
"editor.bracketPairColorization.enabled": false,
// 禁用字体连字
"editor.fontLigatures": false,
// 建议列表中不自动选择项目
"editor.suggest.selectionMode": "never",
// 禁用粘性滚动
"editor.stickyScroll.enabled": false,
// 为 C/C++ 设置 clang-format 的备用样式为 Google
"C_Cpp.clang_format_fallbackStyle": "Google",
// 设置默认格式化程序为 Microsoft 的 C/C++ 扩展
"editor.defaultFormatter": "ms-vscode.cpptools",
// 启用鼠标滚轮缩放功能
"editor.mouseWheelZoom": true,
"editor.lineHeight": 1.0
}
风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。