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

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


    
}

相关文章:

  • 51c自动驾驶~合集49
  • IoTDB 断电后无法启动 DataNode,日志提示 Meet error while starting up
  • Linux centos8部署maven3.9.9
  • 「软件设计模式」建造者模式
  • 数据结构——链表
  • HTML 简介
  • AspectJ 下 Advisor 的排序过程
  • 力扣 15.三数之和
  • 日语发音的节拍
  • org.springframework.boot.autoconfigure.AutoConfiguration.imports为什么使用?如何使用?
  • 【嵌入式Linux应用开发基础】opendir函数、readdir函数和closedir函数(二)
  • 机器学习 - 关于逻辑回归的若干问题
  • 零基础开发自己的微信小程序(工具箱之父)(二)
  • CPP集群聊天服务器开发实践(三):群组聊天业务
  • 请求超时处理
  • 软考教材重点内容 信息安全工程师 第16章 网络安全风险评枯技术原理与应用
  • 【愚公系列】《Python网络爬虫从入门到精通》009-使用match()进行匹配
  • 十四、GitLab 流水线自动化部署之 Windows Server
  • python轻量级框架-flask
  • 135,【2】 buuctf web bestphp‘s revenge
  • “GoFun出行”订单时隔7年扣费后续:平台将退费,双方已和解
  • 官方通报汕头违建豪宅“英之园”将强拆:对有关人员严肃追责问责
  • 从近200件文物文献里,回望光华大学建校百年
  • 赡养纠纷个案推动类案监督,检察机关保障特殊群体胜诉权
  • 澳大利亚首例“漂绿”诉讼开庭:能源巨头因“碳中和”承诺遭起诉
  • 俄方代表团抵达土耳其,俄乌直接谈判有望于当地时间上午重启