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"
    }
}
相关推荐
奥特曼打小白6 分钟前
Visual Studio Code的第一次安装
ide·vscode·编辑器
weixin_456904279 分钟前
Vscode中开发VUE项目的调试方案
ide·vue.js·vscode
小猫挖掘机(绝版)13 分钟前
通过tailscale实现一台电脑上vscode通过ssh连接另一台电脑上的VMware Linux 虚拟机
linux·windows·vscode·ubuntu·ssh
和小胖112215 分钟前
第二讲 Vscode+Python+anaconda 高阶环境配置
ide·vscode·python
峥嵘life1 小时前
Android Studio新版本编译release版本apk实现
android·ide·android studio
凯哥Java2 小时前
适应新环境:Trae编辑器下的IDEA快捷键定制
java·编辑器·intellij-idea
陈老老老板2 小时前
Visual Studio Code 中为Copilot 添加 Bright Data 的 Web MCP
ide·vscode·copilot
西贝爱学习4 小时前
如何在 IntelliJ IDEA 中进行全局替换某个字段(或文本)
java·ide·intellij-idea
胖虎14 小时前
Android Studio 读取本地文件(以 ZIP 为例)
android·ide·android studio·本地文件·读取本地文件
alf_cee4 小时前
通过Idea 阿里插件快速部署java jar包
java·ide·intellij-idea