Comment on page
At the moment, no further configuration is necessary.
You have to tell clangd where to find the
compile_commands.jsoncompilation database. The Zig SDK creates these files in
obj/Debug/linux-x64if you build with
RuntimeIdentifier=linux-x64. Due to the nature of C/C++ compilation, these compilation databases have to be dependent on build flags. So, you will have to pick one of them to use for your editing experience. The good news is that you can change which compilation database you use at any point if you need to.
To tell clangd where to find the compilation database, create a file called
.clangdin your project directory with the following contents:
(You may want to add this file to
You can now restart the clangd language server. You should start to see rich editor features like code completion, hover widgets, navigation, etc.
Last modified 1yr ago