262 questions
0 votes
1 answer
16 views
Getting clangd to work when compiling with MSVC
I'm using Windows 11, CMake, VSCodium, clangd 21.1.0 and Visual Studio 2022 Community. I can compile my project just fine but I don't know how to get clangd set up and working, I know that it's ...
0 votes
0 answers
52 views
Clion 2025.2.4:Clangd: In template: call to '__builtin_operator_delete' selects non-usual deallocation function
I use the tutorial online to solve this problem. Like this https://youtrack.jetbrains.com/issue/CPP-29091/In-template-call-to-builtin-operator-delete-selects-non-usual-de#focus=Comments-27-6067190.0-. ...
5 votes
2 answers
328 views
clangd in CUDA mode treats host-side C++ standard library as unavailable (std::format, chrono, iostream errors)
Problem I'm trying to use clangd for LSP in Neovim with CUDA .cu files, but it fails to recognize standard C++ library features on the host side. Even simple host functions using std::format, std::...
2 votes
1 answer
141 views
Clangd query driver still uses clang source dir
Recently i've been working on some project with GNU arm compiler for C++ project. I've configured clangd to use this compiler with query-driver as clangd documentation recommends. The problem is ...
1 vote
0 answers
53 views
Enabling Code Templates on Eclipse CDT (LSP)
With (old) Eclipse CDT we could define templates under Preferences > C/C++ > Editor > Templates which could be inserted into the code using CTRL + SPACE shortcut. After upgrading to C++20 I ...
0 votes
1 answer
97 views
Force clangd to treat .h file as C header
Clangd LSP in Neovim keeps giving C++ diagnostics for an .h file. How do I force it to give C header diagnostics?
0 votes
0 answers
47 views
.clang-format not putting item on new line [duplicate]
The following is my .clang-format file: IndentWidth: 2 IndentCaseLabels: true AllowShortEnumsOnASingleLine: false ColumnLimit: 100 BinPackArguments: false BinPackParameters: false ...
0 votes
0 answers
212 views
How do you set up clangd properly with a specific toolchain?
I'm using clangd for an embedded systems project in VS Code because it works way better for what I'm trying to do than Microsoft's C/C++ extension for intellisense (and also I had a few cases where my ...
2 votes
0 answers
37 views
clangd LSP with CMock
I’m working on an embedded project that runs on an Infineon TriCore MCU. The certified TriCore‑GCC and its binary libraries are Windows‑only, but I do most work on Linux. To get quick syntax checks ...
1 vote
1 answer
70 views
Clangd find definition in external library
I have a setup with a project written in C that is statically linked with a library. The sources of the library are in a different folder somewhere else on the system. I am using emacs and lsp-mode ...
2 votes
1 answer
86 views
How to disable fillers in COC
I am using Clangd as LSP server. "inlayHint.display": false and "clangd.arguments": ["--function-arg-placeholders=0"]" work to disable the placeholders in functions ...
0 votes
0 answers
246 views
clangd in vs code can't find standard headers
I am using the Windows 11 operating system. I have both gcc and clang on my computer. My MinGW was downloaded from the winlibs website, but the latest version of MinGW lacks clang, so I downloaded it ...
1 vote
0 answers
122 views
Why `usage.c` file in the `git` project causes the Vscode extension 'clangd' server to crash?
I use the clangd extension in vscode. When I open a usage.c file in git project, it crashes. The log here When I transplant the file to other project, the clangd server crash on the transplanted file ...
0 votes
0 answers
69 views
clangd can't resolve ANTLR4 headers in VS Code Dev Container with compile_commands.json
I'm trying to set up a VS Code Dev Container using clangd to get proper C++ autocompletion and diagnostics for a project that uses the ANTLR4 C++ runtime. I have a working Docker-based development ...
0 votes
2 answers
118 views
Clang: compile_commands.json "file" - attribute - What value?
What value do i have to use for the file - attribute in a compile_commands.json for clang? Here it says: https://clang.llvm.org/docs/JSONCompilationDatabase.html file: The main translation unit ...