//.vscode/settings.json
// filename: ${workspaceFolder}/.vscode/settings.json
{
    // 添加这一行参数
    "clangd.arguments": [
        "--compile-commands-dir=${workspaceFolder}/.vscode" //设置到你的放置compile_commands.json文件夹
    ]
}