Logo文档

IDE 设置

为最佳的 NEXTDEVKIT 开发体验设置您的开发环境

🔌 推荐扩展

项目包含一个 .vscode/extensions.json 文件,当您在 VSCode 或 Cursor 中打开项目时,会提示您安装推荐的扩展。

必需扩展

1. Biome

Biome 是一个强大的 JavaScript 和 TypeScript 项目格式化器、代码检查器等工具。它是 ESLint 和 Prettier 的高性能替代品。

功能:

  • ⚡ 快速格式化和代码检查
  • 🔧 自动代码修复
  • 📏 一致的代码风格
  • 🐛 错误检测

安装:

# VSCode/Cursor 扩展 ID
biomejs.biome

下载 Biome 扩展

2. i18n Ally

强大的国际化扩展,用于管理带有自动完成和内联预览的翻译。

功能:

  • 🌍 翻译键自动完成
  • 👁️ 内联翻译预览
  • 🔍 翻译键导航
  • 📝 翻译编辑

安装:

# VSCode/Cursor 扩展 ID
lokalise.i18n-ally

下载 i18n Ally

⚙️ 编辑器配置

VSCode/Cursor 设置

仓库在 .vscode/settings.json 中包含预配置的设置:

.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.jshttps://nextjs.org/docs核心框架功能
Drizzle ORMhttps://orm.drizzle.team/docs数据库操作
Tailwind CSShttps://tailwindcss.com/docs样式和设计
Radix UIhttps://www.radix-ui.com/docsUI 组件
shadcn/uihttps://ui.shadcn.com/docs预构建组件
Better Authhttps://better-auth.com/docs身份验证
Resendhttps://resend.com/docs邮件和时事通讯
Stripehttps://stripe.com/docs支付处理
Zustandhttps://zustand-demo.pmnd.rs/状态管理
Next-Intlhttps://next-intl-docs.vercel.app/国际化
Fumadocshttps://fumadocs.dev/docs文档
React Hook Formhttps://react-hook-form.com/docs表单处理
Zodhttps://zod.dev/架构验证

在 Cursor 中添加文档

  1. 打开 Cursor 设置
  2. 转到功能选项卡
  3. 导航到文档面板
  4. 点击 "+ Add new doc"
  5. 添加文档 URL 和名称

拥有这些文档随时可用将通过减少上下文切换显著加快开发速度。