I (Sven) got the best results with the clangd plugin. It requires
clangd to be installed and a
compile_commands.json file to be in place.
compile_commands.json contains all build parameters for all C files. It can easily be generated with bear. You just have to prefix your build command with
bear -- make [...]
bear -- hadrian/build [...]
If you're using ghc.nix, you'll very likely want use it the provide the dependencies for the previously described plugins.
This can easily be done with the Nix Environment Selector plugin.