IDE 设置
为最佳的 NEXTDEVKIT 开发体验设置您的开发环境
🔌 推荐扩展
项目包含一个 .vscode/extensions.json
文件,当您在 VSCode 或 Cursor 中打开项目时,会提示您安装推荐的扩展。
必需扩展
1. Biome
Biome 是一个强大的 JavaScript 和 TypeScript 项目格式化器、代码检查器等工具。它是 ESLint 和 Prettier 的高性能替代品。
功能:
- ⚡ 快速格式化和代码检查
- 🔧 自动代码修复
- 📏 一致的代码风格
- 🐛 错误检测
安装:
# VSCode/Cursor 扩展 ID
biomejs.biome
2. i18n Ally
强大的国际化扩展,用于管理带有自动完成和内联预览的翻译。
功能:
- 🌍 翻译键自动完成
- 👁️ 内联翻译预览
- 🔍 翻译键导航
- 📝 翻译编辑
安装:
# VSCode/Cursor 扩展 ID
lokalise.i18n-ally
⚙️ 编辑器配置
VSCode/Cursor 设置
仓库在 .vscode/settings.json
中包含预配置的设置:
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome",
"javascript.preferences.importModuleSpecifier": "non-relative"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"typescript.preferences.importModuleSpecifier": "non-relative"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"typescript.preferences.importModuleSpecifier": "non-relative"
},
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"i18n-ally.localesPaths": ["messages", "src/i18n"],
"i18n-ally.enabledFrameworks": ["next-intl"],
"i18n-ally.keystyle": "nested",
"search.exclude": {
"**/node_modules": true
},
"i18n-ally.sourceLanguage": "en",
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
📚 文档集成
如果您使用的是 Cursor,可以使用 Add new doc
功能将关键技术的官方文档添加到您的 Cursor 文档面板中。
为了增强您的开发体验,请将关键技术的官方文档添加到您的 Cursor 文档面板:
核心技术
技术 | 文档 URL | 用途 |
---|---|---|
Next.js | https://nextjs.org/docs | 核心框架功能 |
Drizzle ORM | https://orm.drizzle.team/docs | 数据库操作 |
Tailwind CSS | https://tailwindcss.com/docs | 样式和设计 |
Radix UI | https://www.radix-ui.com/docs | UI 组件 |
shadcn/ui | https://ui.shadcn.com/docs | 预构建组件 |
Better Auth | https://better-auth.com/docs | 身份验证 |
Resend | https://resend.com/docs | 邮件和时事通讯 |
Stripe | https://stripe.com/docs | 支付处理 |
Zustand | https://zustand-demo.pmnd.rs/ | 状态管理 |
Next-Intl | https://next-intl-docs.vercel.app/ | 国际化 |
Fumadocs | https://fumadocs.dev/docs | 文档 |
React Hook Form | https://react-hook-form.com/docs | 表单处理 |
Zod | https://zod.dev/ | 架构验证 |
在 Cursor 中添加文档
- 打开 Cursor 设置
- 转到功能选项卡
- 导航到文档面板
- 点击 "+ Add new doc"
- 添加文档 URL 和名称
拥有这些文档随时可用将通过减少上下文切换显著加快开发速度。