You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m not sure this is a feature request or a bug report, but here goes:
I’m trying to set up a C++ development environment using Clang. I install clang using devbox, which includes clangd (LSP). The clang++ compiler works fine, but clangd requires some extra magic to find the right headers. (I use Meson as a build system, which may be part of the problem — its compile_commands.json generation, which clangd relies on, does not find any implicit headers.)
After several hours of trial and error, I found that the following .clangd file makes everything work:
What problem are you trying to solve?
I’m not sure this is a feature request or a bug report, but here goes:
I’m trying to set up a C++ development environment using Clang. I install clang using devbox, which includes clangd (LSP). The
clang++
compiler works fine, butclangd
requires some extra magic to find the right headers. (I use Meson as a build system, which may be part of the problem — itscompile_commands.json
generation, which clangd relies on, does not find any implicit headers.)After several hours of trial and error, I found that the following
.clangd
file makes everything work:Which is horrible, because I don’t want to hardcode Nix store paths in my project.
Unfortunately, it looks like the necessary headers are only available in
clang-wrapper
. Andglibc
is a transitive dependency somewhere.What solution would you like?
I’d like to have those derivations linked in my project’s
.devbox
directory. Is this possible?Alternatives you've considered
I tried installing things like
clang-unwrapped
and that does not seem to have the necessary headers. Maybe I did it wrong.The text was updated successfully, but these errors were encountered: