vscode clangd插件 编译失败会跳转失败,有时候也会经常出现跳转失败的情况

.clangd

bash 复制代码
CompileFlags:
  Add: [
    "-I/home/wls/gits/liuyedao/toolchain/sysroot/usr/include",
    "-I/home/wls/gits/liuyedao/toolchain/sysroot/usr/include/c++/9.3.0",
    "-I/home/wls/gits/liuyedao/toolchain/sysroot/usr/include/arm-linux-gnueabihf",
    "-target=arm-linux-gnueabihf",
    "--sysroot=/home/wls/gits/liuyedao/toolchain/sysroot"
  ]

vscode workplace file

bash 复制代码
{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        // ===== clangd 插件相关设置 =====
        "clangd.arguments": [
            "--compile-commands-dir=./",
            "--background-index",
            "--header-insertion=never"
        ]
        ,
        "clangd.path": "/usr/bin/clangd",         // 可改成你系统实际的 clangd 路径
        "C_Cpp.intelliSenseEngine": "Disabled",   // 禁用 VSCode 自带的 IntelliSense,防冲突

        // ===== UI 样式设置 =====
        "workbench.colorCustomizations": {
            "activityBar.activeBackground": "#65c89b",
            "activityBar.background": "#65c89b",
            "activityBar.foreground": "#15202b",
            "activityBar.inactiveForeground": "#15202b99",
            "activityBarBadge.background": "#945bc4",
            "activityBarBadge.foreground": "#e7e7e7",
            "commandCenter.border": "#15202b99",
            "sash.hoverBorder": "#65c89b",
            "statusBar.background": "#42b883",
            "statusBar.foreground": "#15202b",
            "statusBarItem.hoverBackground": "#359268",
            "statusBarItem.remoteBackground": "#42b883",
            "statusBarItem.remoteForeground": "#15202b",
            "titleBar.activeBackground": "#42b883",
            "titleBar.activeForeground": "#15202b",
            "titleBar.inactiveBackground": "#42b88399",
            "titleBar.inactiveForeground": "#15202b99"
        },

        // ===== 插件:comment translate 配置 =====
        "peacock.remoteColor": "#42b883",
        "commentTranslate.targetLanguage": "zh-CN",
        "commentTranslate.source": "Bing"
    }
}
相关推荐
d111111111d37 分钟前
什么是内存对齐?在STM32上面如何通过编辑器指令来实现内存对齐。
笔记·stm32·单片机·嵌入式硬件·学习·编辑器
琢瑜3 小时前
VS Code 最下面那一整条蓝色状态栏不见了怎么恢复(Status Bar)状态栏(Status Bar)
vscode
bkspiderx4 小时前
Visual Studio 2026安装常见问题与解决方案
ide·visual studio·vs2026·vc2026安装
取加若则_4 小时前
Vim基本操作
linux·编辑器·vim
Highcharts.js5 小时前
从旧版到新版:Highcharts for React 迁移全攻略 + 开发者必知的 5 大坑
前端·react.js·前端框架·编辑器·highcharts
bkspiderx5 小时前
Visual Studio 2026 安装指南(2025年最新状态+通用流程)
ide·安装·visual studio·vs2026
猫头虎7 小时前
PyCharm 2025.3 最新变化:值得更新吗?
ide·爬虫·python·pycharm·beautifulsoup·ai编程·pip
努力的小帅7 小时前
通过VSCode远程连接到CentOS7/Ubuntu18等老系统
ide·vscode·编辑器
MC皮蛋侠客7 小时前
distcc结合VSCode实现分布式编译的全面指南
c++·ide·分布式·vscode
zew10409945887 小时前
PyCharm【2023.2.5下】中命令行【Terminal】不见了如何解决?
ide·python·pycharm·快捷键·terminal·命令行消失