MounRiver Studio自定义主题

📅 2026/7/1 14:44:11
MounRiver Studio自定义主题
最近在使用这个编译器进行开发对于刚开始接触发现其内置的主题都不是我想要的风格于是摸索了一番最终找到了修改的方法。主要就是修改settings.josn文件在其中加入如下代码即可{ // 串口终端日志保存路径 SerialTerminal.log.savePath: c:\\Users\\86137\\serialTerminal\\terminalLog, // 串口终端脚本保存路径 SerialTerminal.script.savePath: c:\\Users\\86137\\serialTerminal\\scriptNoteBook, // 当前使用的主题 workbench.colorTheme: Visual Studio Dark, // 保存时自动执行的操作空对象表示不启用 editor.codeActionsOnSave: { }, // Emmet 缩写语法配置空对象表示使用默认 emmet.syntaxProfiles: { }, // 自定义代码语法高亮颜色 editor.tokenColorCustomizations: { textMateRules: [ // 注释颜色 { scope: comment, // 所有注释 settings: { foreground: #7ccd7d, // 绿色 // fontStyle: italic // 斜体 } }, // 关键字颜色 { scope: keyword, // 所有关键字if, else, return, for 等 settings: { foreground: #87CEEB // 天蓝色 } }, // 字符串颜色 { scope: string, // 所有字符串abc、x 等 settings: { foreground: #FA8072 // 鲑鱼色 } }, // 数字常量颜色 { scope: constant.numeric, // 数字100, 3.14, 0xFF 等 settings: { foreground: #FA8072 // 鲑鱼色 } }, // 类型名称颜色 { scope: entity.name.type, // 类型名int, float, struct, class 等 settings: { foreground: #87CEEB // 天蓝色 } }, // 存储类型关键字颜色 { scope: storage.type, // 存储类型static, const, volatile 等 settings: { foreground: #87CEEB // 天蓝色 } }, // 函数名称颜色 { scope: entity.name.function, // 函数名main, printf, userFunction 等 settings: { foreground: #FFA54F // 橙色 } }, // 运算符颜色 { scope: keyword.operator, // 运算符 - * / ! 等 settings: { foreground: #f7e45a // 黄色与关键字一致 } }, // 预编译指令颜色 // 预编译指令关键字颜色 { scope: keyword.control.directive, // 通用预编译指令 settings: { foreground: #87CEEB // 天蓝色 } }, { scope: keyword.control.directive.include, // #include settings: { foreground: #89DDFF // 亮蓝色 } }, { scope: keyword.control.directive.define, // #define settings: { // foreground: #C586C0 // 紫色 foreground: #89DDFF // 亮蓝色 } }, { scope: keyword.control.directive.pragma, // #pragma settings: { foreground: #87CEEB // 天蓝色 // foreground: #f80808 // 淡红色 } }, { scope: keyword.control.directive.line, // #line settings: { foreground: #f80808 // 淡红色 } }, // #if #ifdef #ifndef #elif #else #endif 条件编译指令 { scope: keyword.control.directive.conditional, settings: { foreground: #87CEEB // 天蓝色 // foreground: #f80808 // 淡红色 } }, //被条件编译屏蔽的代码#if 0 内部代码 { scope: [ meta.preprocessor.if-branch.in-block.c, comment.block.preprocessor.if-branch ], settings: { foreground: #7ccd7d, // 绿色 fontStyle: italic // 斜体 } }, // 格式化占位符颜色 // 格式化占位符%s、%d、%f、%x、%p、%u、%c 等 { scope: constant.other.placeholder, settings: { foreground: #ffffff // 白色 } }, ] }, // 语义标记颜色更精细的代码着色控制 editor.semanticTokenColorCustomizations: { enabled: true, // 启用语义着色 rules: { // class: #87CEEB, // 类名 天蓝色 // function: #FFA54F, // 函数 橙色 variable: #ffffff, // 变量 浅灰 // parameter: #D0D0D0, // 参数 浅灰 // property: #D0D0D0, // 属性 浅灰 // method: #FFA54F, // 方法 橙色 macro: #FFA54F, // 宏 橙色 // namespace: #87CEEB, // 命名空间 天蓝色 // type: #87CEEB, // 类型 天蓝色 enumMember: #D0D0D0 // 枚举成员 浅灰 } }, // // 自定义工作台界面颜色 // workbench.colorCustomizations: { // editor.background: #2E2E2E, // 编辑器背景色 深灰 // editor.foreground: #DCDCDC, // 编辑器默认文字颜色 浅灰 // editor.lineHighlightBackground: #3E3E3E, // 当前行高亮背景 稍亮深灰 // editor.selectionBackground: #434343, // 选中文字背景 深灰 // editorCursor.foreground: #55BD6A, // 光标颜色 绿色 // editorLineNumber.foreground: #4B4B4B, // 行号颜色 中灰 // editorLineNumber.activeForeground: #DCDCDC, // 当前行行号颜色 浅灰 // editor.findMatchHighlightBackground: #534333, // 查找匹配高亮背景 棕灰色 // tab.activeBackground: #2D2D2D, // 活动标签页背景 深灰 // tab.inactiveBackground: #383838, // 非活动标签页背景 中灰 // sideBar.background: #2E2E2E, // 侧边栏背景 深灰 // sideBarSectionHeader.background: #383838, // 侧边栏分区标题背景 中灰 // activityBar.foreground: #f7f7f7, // 活动栏图标颜色 白色 // statusBar.background: #383838, // 状态栏背景 中灰 // statusBar.foreground: #9b9b9b, // 状态栏文字颜色 浅灰 // panel.background: #333333, // 面板背景 灰 // titleBar.activeBackground: #424242, // 标题栏激活窗口时背景 中灰 // titleBar.inactiveBackground: #424242 // 标题栏非激活窗口时背景 中灰 // }, }settings.josn文件打开方法快捷键ctrlshiftp,然后輸入settings选择如下图选项即可