Open Trass3r opened 3 years ago
It could potentially simplify the clang-tidy integration too which currently calls the tool manually.
Thinking about it, how did that solve the problem of include paths hard-coded into the gcc cross compiler? Those are missing in the json file of course.
sorry for my dumb questions, but I'm new to vscode and would REALLY try clangd use because cpptools aren't great... it often don't find the right symbols or definition... but I don't get what to do with compiledb.py, should I create this file into my source tree? and the extra_scripts, where should it go? tried to launch on console pio run* command given in the exemple, but it says that pio is not found thanks and regards
pio run -t compile_commands.json
This doesn't seem to work anymore, it gives me *** Do not know how to make File target `compile_commands.json' (...). Stop.
. No other warnings, so I'm guessing the compiledb.py
script is loaded correctly.
Looks like this is built into platformio somewhere somehow now, the script is no longer required and the command is pio run -t compiledb
.
This would allow people to use choose clangd as the language server, get clang-tidy warnings in real-time and use other tools based on that json file. It could potentially simplify the clang-tidy integration too which currently calls the tool manually.
Generating one manually is possible via
pio run -t compile_commands.json
with:compiledb.py
:But it would be great to have built-in support so it gets automatically (re-)generated only when the project setup changes (so tools like clangd don't have to restart all the time).