Closed Compro-Prasad closed 5 years ago
compile_commands.json
should not be generated automatically.
compile_commands.json
: I usually prefer $project/Debug
and for CMake-based projects I use cmake -H. -BDebug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES <other options>
. This operation creates some files that may not be wanted.-D*
options. They cannot be known beforehand.compile_commands.json
is not the only available choice: after the merge of https://github.com/MaskRay/ccls/pull/171 , .ccls
can augment compile_commands.json
compile_commands.json
. I don't want to locate the project root with compile_commands.json
(lots of other plugins do things like this) because:proj
Debug
compile_commands.json
generate.h # this belongs to proj, not proj/Debug
compile_commands.json -> Debug/compile_commands.json
Doing this will help in getting started with LSP easily. A command to do this would be enough. I think this can be done with the help of
projectile
and/orproject.el
. By asking the user questions about the command to run to generate thecompile_commands.json
from project root.