mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-05 05:21:26 +08:00
### What this PR does Before this PR: - No Zed editor configuration example existed for contributors using Zed - Several config files had inconsistent JSON array formatting - `biome.jsonc` had redundant exclude rules - Contributing guides did not reference the development guide - `development.md` (zh) was not translated to Chinese - Node.js and pnpm versions were hardcoded in the development guide After this PR: - Added `.zed/settings.json.example` with Biome formatter, oxc/eslint/biome fixAll, and import organization - Cleaned up redundant Biome exclude rules and unified JSON array formatting - Added "Setting Up Your Development Environment" section to `CONTRIBUTING.md` (en/zh) linking to the development guide - Added Zed editor setup guide to `development.md` (en/zh) - Translated `docs/zh/guides/development.md` to Chinese - Node.js version now references `.node-version`; pnpm version references `packageManager` in `package.json` - VSCode extensions now reference `.vscode/extensions.json` ### Why we need it and why it was done in this way The following tradeoffs were made: - The Zed settings file is provided as an `.example` rather than a direct `.zed/settings.json` to avoid overriding individual contributor preferences. - Versions reference their source of truth files rather than being hardcoded, so docs stay in sync automatically. The following alternatives were considered: - N/A ### Breaking changes None ### Special notes for your reviewer - The JSON formatting changes are purely cosmetic — no behavior changes. They align with Biome's default formatting rules. - The `.zed/settings.json.example` includes `source.fixAll.eslint` and `source.fixAll.oxc` alongside Biome, matching the project's triple-linter setup. ### Checklist - [x] PR: The PR description is expressive enough and will help future contributors - [x] Code: [Write code that humans can understand](https://en.wikiquote.org/wiki/Martin_Fowler#code-for-humans) and [Keep it simple](https://en.wikipedia.org/wiki/KISS_principle) - [x] Refactor: You have [left the code cleaner than you found it (Boy Scout Rule)](https://learning.oreilly.com/library/view/97-things-every/9780596809515/ch08.html) - [x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required - [x] Documentation: A [user-guide update](https://docs.cherry-ai.com) was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior. - [x] Self-review: I have reviewed my own code (e.g., via [`/gh-pr-review`](/.claude/skills/gh-pr-review/SKILL.md), `gh pr diff`, or GitHub UI) before requesting review from others ### Release note ```release-note NONE ``` --------- Signed-off-by: icarus <eurfelux@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
71 lines
1.6 KiB
JSON
71 lines
1.6 KiB
JSON
// Cherry Studio Zed Settings Example
|
|
//
|
|
// NOTE: Please install extensions: biome, oxc
|
|
//
|
|
// Folder-specific settings
|
|
//
|
|
// For a full list of overridable settings, and general information on folder-specific settings,
|
|
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
|
{
|
|
"languages": {
|
|
"JSON": {
|
|
"code_actions_on_format": {
|
|
"source.fixAll.biome": true
|
|
},
|
|
"format_on_save": "on",
|
|
"formatter": {
|
|
"language_server": {
|
|
"name": "biome"
|
|
}
|
|
}
|
|
},
|
|
"JSONC": {
|
|
"code_actions_on_format": {
|
|
"source.fixAll.biome": true
|
|
},
|
|
"format_on_save": "on",
|
|
"formatter": {
|
|
"language_server": {
|
|
"name": "biome"
|
|
}
|
|
}
|
|
},
|
|
"TSX": {
|
|
"code_actions_on_format": {
|
|
"source.fixAll.biome": true,
|
|
"source.fixAll.eslint": true,
|
|
"source.fixAll.oxc": true,
|
|
"source.organizeImports.biome": true
|
|
},
|
|
"format_on_save": "on",
|
|
"formatter": {
|
|
"language_server": {
|
|
"name": "biome"
|
|
}
|
|
}
|
|
},
|
|
"TypeScript": {
|
|
"code_actions_on_format": {
|
|
"source.fixAll.biome": true,
|
|
"source.fixAll.eslint": true,
|
|
"source.fixAll.oxc": true,
|
|
"source.organizeImports.biome": true
|
|
},
|
|
"format_on_save": "on",
|
|
"formatter": {
|
|
"language_server": {
|
|
"name": "biome"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"lsp": {
|
|
"biome": {
|
|
"settings": {
|
|
"config_path": "biome.jsonc",
|
|
"require_config_file": true
|
|
}
|
|
}
|
|
}
|
|
}
|