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"
    }
}
相关推荐
浔川python社18 分钟前
浔川系列产品后台维护与漏洞修复公告
编辑器
小小啊python11 小时前
IDEA中SpringBoot项目配置热部署
java·ide·intellij-idea·springboot·热部署
golang学习记12 小时前
VS Code 2026年的正确的打开方式
vscode
烂蜻蜓1 天前
Node.js入门教程(二十三):全局对象
node.js·编辑器·vim
树码小子1 天前
Pycharm解释器配置问题解决
ide·python·pycharm
FlyWIHTSKY1 天前
idea中集成claude功能
java·ide·人工智能·intellij-idea·cloudera
BIBI20491 天前
Windows 下 Maven 安装与 VSCode 配置
java·windows·vscode·maven·环境搭建·安装教程
weixin_404679312 天前
godot + vscode ai开发
ide·vscode·编辑器·游戏引擎·godot
我一定会有钱2 天前
vscode system下载安装
ide·vscode·编辑器
2401_858286112 天前
VSCODE远程链接错误: 无法建立链接,过程试图写入的管道不存在的解决方法
ide·vscode·编辑器