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的配置文件

bash 复制代码
{
    // 启用命令中心
    "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


    
}
相关推荐
易水寒陈9 分钟前
FreeRTOS的事件组
stm32·单片机
接着奏乐接着舞。19 分钟前
【vscode源码】如何编译运行vscode及过程中问题解决
ide·vscode·编辑器
iCheer-xu2 小时前
VSCODE内使用Jupyter模式,运行backtrader不展示图片、图片尺寸无法自定义的处理方案
ide·vscode·jupyter
yyhnet.cn3 小时前
在cursor/vscode中使用godot C#进行游戏开发
vscode·c#·godot·cursor
隼玉6 小时前
C语言简单练习题
c语言·c++·笔记·学习·算法
鹏展-penggeon8 小时前
STM32学习笔记【大学生电子设计竞赛】【嵌入式】【标准库学习】【HAL库学习】
stm32
牛奶咖啡.8549 小时前
经典排序算法复习----C语言
c语言·开发语言·数据结构·算法·排序算法
年*D-清仁9 小时前
STM32+Proteus+DS18B20数码管仿真实验
stm32·单片机·proteus
想要成为糕手。9 小时前
stm32-wifi模块
stm32·嵌入式硬件·php