Improve clangd support #8867

Open
Tmpod wants to merge 1 commit from Tmpod/task/improve-clangd-support into master

1 commit

Author SHA1 Message Date
de115107b0
Improve clangd support
clangd is a very useful tool, serving as a Language Server for C/C++,
helping non-IDE editors tremendously.
With these tweaks, it works flawlessly on my setup.

Add a .clangd config file to exclude the `-mno-direct-extern-access`
flag which works fine on gcc but not on clang.
Also tell CMake to export a thing called "compile commands", which is
essentially a JSON file detailing all the commands used in compilation,
so that clangd can correctly process headers and allow you to jump
between definitions, uses and whatnot.
Finally, adds `.cache/clangd` to the gitignore file.

Signed-off-by: tmpod <tom@tmpod.dev>
2024-08-06 18:18:01 +01:00