Compile_commands.json file control

Hi,
I use neovim to write/edit code for esp-idf, clangd for lsp.
To enable code completion, I use compile_commands.json, PlatformIO generated.
In that file, compile command starts from “command”: xtensa-esp32-elf-gcc -o.
But I haven’t added platformio toolchain directory, so clangd can’t recognize “command” : xtensa-esp32-elf-gcc, then, clangd emitts many errors.
When I edit the compile commands to have full path of xtensa-esp32-elf-gcc, code completion works without any errors.
Is there any setting to add full path of xtensa-esp32-elf-gcc to compile_commands.json?

I don’t think there is any setting regarding this. You can just add $HOME/.platformio/packages/toolchain-xtensa-esp32/bin to your PATH.