You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: LSP support for choosing between multiple build directories (c++ / clangd) #7780
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Hi,
C++ projects have one source directory, but they usually have multiple build directories, and the build directories might not be located in the root of the the source directory.
For the LSP (clangd) to give correct information, it needs to be told which build directory to use.
As far as I can tell, opencode currently just starts up clangd in the source directory, and there is no documented way in opencode to tell it which build directory to use.
It would be great if this was configurable in opencode, without having to fully override / add a new LSP entry config.
Or even better, it if it would be automatically discoverable / adjustable depending on which build dir the LLM created and is using, without having to manually track / modify this as a user.
For clangd, this can be specified either via a command line --compile-commands-dir to the clangd invocation , or via env var
These issues all relate to improving LSP configurability and environment handling. You might find solutions or discussion in these related issues that could help with your specific clangd build directory configuration needs.
Feel free to ignore if none of these address your specific case.
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of or related to existing issues. Please check:
These issues all relate to improving LSP configurability and environment handling. You might find solutions or discussion in these related issues that could help with your specific clangd build directory configuration needs.
Feel free to ignore if none of these address your specific case.
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
alcroito commentedon Mar 25, 2026
Are you sure you want me to create a new issue with the exact same description?
There hasn't been any feedback on this one at all.