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"
    }
}
相关推荐
Lhan.zzZ6 小时前
笔记_2026.4.28_004
c++·ide·笔记·qt
π同学12 小时前
ESP-IDF+vscode开发ESP32第十一讲——LEDC
vscode·pwm·eps32
一帘忧梦20 小时前
vscode 搭建stm32开发环境 +HAL 库
ide·vscode·编辑器
剑神一笑21 小时前
CSS Animation Timeline 可视化动画编辑器:从关键帧到流畅动画
前端·css·编辑器
独隅2 天前
Visual Studio 2026 详细安装教程和配置指南
ide·visual studio
He少年2 天前
【AI 辅助案例分享】
人工智能·c#·编辑器·ai编程
Robot_Nav2 天前
AI 编程助手 Skill 完全指南:VS Code · Trae CN · Claude Code
人工智能·vscode·skill·trae·claude code
vortex52 天前
Kali Linux 安装与使用 Code-OSS / VSCodium :VSCode 轻量替代
linux·运维·编辑器
lifewange2 天前
Pycharm和IDEA中安装Cursor的方法
ide·pycharm·intellij-idea
生而为虫2 天前
在VScode中使用Claude Code agent并配置模型(仅mac电脑实际操作,windows电脑未实际操作如有问题可留言)
windows·vscode·macos