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

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


    
}


http://www.kler.cn/a/538128.html

相关文章:

  • 什么是中间件中间件有哪些
  • 线程上下文-ThreadLocal原理
  • 爬取豆瓣电影 Top250 数据的脚本及调整方法
  • 青少年编程与数学 02-009 Django 5 Web 编程 03课题、项目结构
  • 【C/C++】每日温度 [ 栈的应用 ] 蓝桥杯/ACM备赛
  • 【STM32F1】一种使用通用定时器实现各个通道独立输出不同指定数量脉冲的方法
  • Python第三方库复制到另一台电脑保持安装环境一致
  • 【RK3588嵌入式图形编程】-SDL2-创建应用事件循环
  • 【DeepSeek-01】无需 Docker,千元级电脑本地部署 Ollama + DeepSeek-R1:14b + Chatbox
  • stm32蓝牙模块
  • 【Pytorch实战教程】让数据飞轮转起来:PyTorch Dataset与Dataloader深度指南
  • Linux网卡配置方法
  • 02为什么 OD门和 OC门输出必须加上拉电阻?
  • 机器学习-关于线性回归的表示方式和矩阵的基本运算规则
  • 【STM32F1】一种使用通用定时器实现各个通道独立输出不同指定数量脉冲的方法
  • 掌握内容中台与人工智能技术的新闻和应用场景分析
  • vue的响应式原理以及Vue 3.0在响应式原理上的优化方案
  • Blocked aria-hidden on an element because its descendant retained focus.
  • CASAIM与马来西亚 Perodua汽车达成合作,共推汽车制造质量升级
  • 【C++八股】const和define的区别
  • 在亚马逊云科技上云原生部署DeepSeek-R1模型(下)
  • Spring Boot 多数据源解决方案:dynamic-datasource-spring-boot-starter 的奥秘(上)
  • 基于HTML5 Canvas 的盖楼游戏
  • 大数据治理新纪元:全面解读前沿开源技术的力量
  • DeepSeek——DeepSeek模型部署实战
  • 使用 OpenGL ES 加载图片并写入纹理单元