Elixir .cursorrules
A minimal .cursorrules template for Elixir projects in Cursor IDE.
Template (27 lines)
Section titled “Template (27 lines)”# Elixir Project Rules
## Tech Stack- Elixir 1.17+- Phoenix 1.7 (or pure Elixir)- Ecto for database- ExUnit for tests
## Commands- `mix phx.server` - Start server- `mix test` - Run tests- `mix format` - Format code- `mix credo` - Lint- `mix ecto.migrate` - Migrations
## Code Style- Use pattern matching over conditionals- Pipe operator for data transformations- Contexts for business logic- Small functions, clear names
## Gotchas- [Add your project-specific gotchas]
## File Patterns- Controllers: `lib/app_web/controllers/[name]_controller.ex`- Contexts: `lib/app/[context].ex`- Schemas: `lib/app/[context]/[schema].ex`- LiveViews: `lib/app_web/live/[name]_live.ex`- Copy the template above
- Save as
.cursorrulesin your project root - Review and update the Tech Stack to match your project
- Replace
appwith your application name - Add your project-specific gotchas