Files
arc53-machine 53facb460c chore: add Zed project config, .editorconfig and shared pyright settings
- .zed/settings.json: ruff + basedpyright for Python (no format on save, the
  tree is not ruff-format clean), ESLint fixes then Prettier for the frontend,
  scan exclusions for caches and build outputs, .jwt_secret_key as private
- .zed/tasks.json: dev services, API, worker, frontend, pytest/vitest for the
  current file or test, linting, uv lock + requirements export
- .zed/debug.json: debugpy targets matching .vscode/launch.json
- .editorconfig: whitespace rules for every editor
- [tool.pyright] in pyproject.toml: venv, import root and excludes shared by
  pyright, basedpyright and Pylance
- .gitignore: track only the shared files under .zed/
- CONTRIBUTING: editor setup section; fix the stale ESLint config path
2026-09-21 16:10:31 +01:00

90 lines
2.7 KiB
JSON

// Project settings for the Zed editor (https://zed.dev/docs/configuring-zed).
// They mirror what CI and the pre-commit hook enforce; whitespace rules live in
// .editorconfig and the Python analysis config in pyproject.toml
// ([tool.pyright]) so other editors share them. Personal preferences belong in
// your user settings, not here.
{
// Zed replaces its defaults when this key is set, so they are repeated first.
// Build outputs, caches and local runtime data only add noise to the file
// finder and project search.
"file_scan_exclusions": [
"**/.git",
"**/.svn",
"**/.hg",
"**/.jj",
"**/.sl",
"**/.repo",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/.classpath",
"**/.settings",
"**/__pycache__",
"**/.ruff_cache",
"**/.pytest_cache",
"**/.mypy_cache",
"**/htmlcov",
"**/.next",
"frontend/dist",
"docsgpt/static",
"**/indexes",
"**/inputs",
"**/vectors",
"models"
],
// Never shared with collaborators or sent to an AI assistant. The first six
// are Zed's defaults, which this key also replaces.
"private_files": [
"**/.env*",
"**/*.pem",
"**/*.key",
"**/*.cert",
"**/*.crt",
"**/secrets.yml",
"**/.jwt_secret_key"
],
"file_types": {
"Shell Script": [".env-template"],
"Dockerfile": ["Dockerfile*"]
},
"languages": {
"Python": {
"language_servers": ["basedpyright", "ruff", "..."],
"formatter": { "language_server": { "name": "ruff" } },
// CI runs `ruff check` only and most of the tree is not `ruff format`
// clean, so formatting on save would bury a change in unrelated diffs.
"format_on_save": "off",
"preferred_line_length": 120,
"wrap_guides": [120]
},
// Same order as the lint-staged hook: ESLint fixes, then Prettier.
"TypeScript": {
"formatter": "prettier",
"format_on_save": "on",
"code_actions_on_format": { "source.fixAll.eslint": true }
},
"TSX": {
"formatter": "prettier",
"format_on_save": "on",
"code_actions_on_format": { "source.fixAll.eslint": true }
},
"JavaScript": {
"formatter": "prettier",
"format_on_save": "on",
"code_actions_on_format": { "source.fixAll.eslint": true }
},
// Docs prose is reviewed by Vale, not reflowed by a formatter.
"Markdown": { "format_on_save": "off" },
"MDX": { "format_on_save": "off" }
},
"lsp": {
// The ESLint config is frontend/eslint.config.js, not at the root.
"eslint": {
"settings": { "workingDirectory": { "mode": "auto" } }
},
"tailwindcss-language-server": {
"settings": { "classFunctions": ["cn", "cva", "clsx", "twMerge"] }
}
}
}