feat: Support project-level clangd path configuration via project.yml#1192
Open
code4lala wants to merge 4 commits intooraios:mainfrom
Open
feat: Support project-level clangd path configuration via project.yml#1192code4lala wants to merge 4 commits intooraios:mainfrom
code4lala wants to merge 4 commits intooraios:mainfrom
Conversation
Merge ls_specific_settings from serena_config and project_config, with project_config taking precedence
Author
|
@opcode81 This PR is ready for review! Thanks in advance for taking a look. 🙏 Please let me know if any updates are needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for configuring language server-specific settings (such as clangd path) at the project level through
.serena/project.yml, previously this configuration was only possible globally via~/.serena/serena_config.yml.Background
Previously, users could only specify custom clangd paths using ls_specific_settings.cpp.ls_path in the global
~/.serena/serena_config.ymlfile. This limitation meant that different projects requiring different clangdversions or paths could not be configured independently, forcing users to either:
Changes
This PR introduces the following changes:
src/serena/config/serena_config.py:src/serena/project.py:Configuration Example
Users can now configure clangd path in their project's
.serena/project.yml:The configuration hierarchy is:
~/.serena/serena_config.yml(base configuration).serena/project.yml(overrides global settings)Testing
The implementation has been verified by:
ls_specific_settings.cpp.ls_pathfrom global~/.serena/serena_config.yml.serena/project.ymlserena project index --log-level DEBUGand confirming:Impact
This change improves the developer experience by: