Pio build and compile_commands.json

The .clang_complete file, produced by pio init --ide emacs, is of no help by using language servers like clangd or ccls. It would be nice if platformio could produce a compile_commands.json file, because otherwise emacs is useless if you want to use lsp or eglot.

I don’t know about the internals of platformio, but a compile_commands.json file can be produced by cmake, see https://clang.llvm.org/docs/JSONCompilationDatabase.html