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"
    }
}
相关推荐
界面开发小八哥9 小时前
「Java EE开发指南」如何用MyEclipse将Java项目转换为Web项目?
java·ide·java-ee·eclipse·开发工具·myeclipse
专注VB编程开发20年11 小时前
各版本操作系统对.NET支持情况(250707更新)
开发语言·前端·ide·vscode·.net
誰能久伴不乏12 小时前
深入了解 Vim 编辑器:从入门到精通
linux·编辑器·vim
GDAL15 小时前
vscode 插件开发activityba
vscode·编辑器
learn_coder15 小时前
在vscode中和obsidian中使用Mermaid
ide·vscode·编辑器
程序员的世界你不懂20 小时前
IDE 关联 Git 操作
ide·git
karry013021 小时前
高并发导致重复key问题--org.springframework.dao.DuplicateKeyException
java·数据库·ide
前端小超人rui1 天前
UEditor 对接 秀米 手机编辑器流程与问题
编辑器
l1x1n01 天前
Vim 编辑器常用操作详解(新手快速上手指南)
linux·编辑器·vim