TL;DR
A temporary shell can be used to configure clangd for project-specific settings, allowing multiple firmware projects to share code while maintaining individual compilation databases. This approach simplifies the development process in terminal-based environments.
✦ Why It Matters
Implement a temporary shell for clangd to manage project-specific configurations effectively today.
Key Takeaways
How It Works
The script takes a build target as an argument and sets up a temporary directory containing a target-specific compile_commands.json file. It creates a wrapper for clangd that points to this temporary file, ensuring that any editor launched from this shell uses the correct configuration.
By modifying the PATH variable, the script prioritizes the temporary clangd wrapper, preventing conflicts with other instances.
Related