From ae2190f65c16f3753448dc9f19adf4a6ccdcf391 Mon Sep 17 00:00:00 2001 From: Shuhao Wu Date: Sat, 3 Aug 2024 20:56:22 -0400 Subject: [PATCH] Fixed clangd in ROS workspace. Adding a .clangd file in the root of the repo causes it to be used even if cactus-rt is developed as a part of a ROS package, which causes clangd to not show the appropriate completion data. By moving it into a vscode config, we get around this problem for now. --- .clangd | 9 --------- .vscode/settings.json | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .clangd diff --git a/.clangd b/.clangd deleted file mode 100644 index 8d77a72..0000000 --- a/.clangd +++ /dev/null @@ -1,9 +0,0 @@ ---- -CompileFlags: - CompilationDatabase: build/debug ---- -If: - PathMatch: tests/.* - -CompileFlags: - CompilationDatabase: build/test diff --git a/.vscode/settings.json b/.vscode/settings.json index 0f1da25..31a9bc8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,8 @@ "editor.formatOnSave": true, "[cpp]": { "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" - } + }, + "clangd.arguments": [ + "--compile-commands-dir=${workspaceFolder}/build/debug" + ] }