feat(config): implement unified configuration system#26
Merged
Conversation
Implement a unified configuration system replacing legacy config file names: - Config location: .please/config.json or .please/config.yml - Added LSP configuration schema with server enable/disable and custom root paths - Added shared settings: language (en/ko) and ignore_patterns - LSPManager now supports config via constructor or static fromProject() method - Updated format loader to search new config location - Removed legacy opencode.json and dora.json references Changes: - packages/format/src/config/loader.ts: Updated search paths - packages/format/src/config/schema.ts: Added LspConfigSchema and unified Config - packages/format/package.json: Added subpath export for config - packages/lsp/src/config.ts: New module with LSP config utilities - packages/lsp/src/index.ts: Integrated config loading - packages/lsp/package.json: Added @pleaseai/code-format dependency - CLAUDE.md: Added configuration documentation - bun.lock: Updated dependencies
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
==========================================
- Coverage 33.09% 32.14% -0.95%
==========================================
Files 13 14 +1
Lines 2798 2946 +148
==========================================
+ Hits 926 947 +21
- Misses 1872 1999 +127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add ConfigValidationError and ConfigLoadError custom error classes - Throw errors instead of silently falling back to defaults - Only catch SyntaxError in JSON/YAML parsing to avoid swallowing errors - Add proper error context for file read/parse operations - Add min(1) validation to LspItemSchema for root and command fields - Clarify isServerEnabled logic with explicit boolean checks - Integrate getServerRoot into LSPManager for custom root paths - Update packages/lsp/CLAUDE.md with config documentation - Use stderr for config loading message to avoid JSON output interference
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
Implement a unified configuration system replacing legacy config file names (opencode.json, dora.json) with a modern
.please/config.jsonor.please/config.ymlapproach.This PR centralizes configuration management across the format and LSP packages with:
Changes
.please/config.(json|yml)Example Configuration
```json
{
"language": "en",
"ignore_patterns": ["node_modules", "dist"],
"formatter": {
"biome": { "disabled": false },
"prettier": { "disabled": false }
},
"lsp": {
"typescript": { "enabled": true },
"prisma": { "enabled": true, "root": "./apps/api" }
}
}
```
Test plan
.please/config.jsonand.please/config.yml