1

I'm trying to set up Emacs for C++ development, with IDE-like features. I installed eglot and have got it working, somewhat. Flymake is drawing red error markers and reporting errors on #include ... lines, but everything compiles fine.

I wonder if these false errors are because I never told it about my compile_commands.json file. I use CMake, and at the root of my project I have a build/binary dir named build-debug. When I run cmake I generate the file, so it's there in build-debug/compile_commands.json.

Is there a way to tell eglot/clangd about this file?

1 Answer 1

2

The solution is simple: just add a symlink ln -s build-debug/compile_commands.json in your project root.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.