🚀 Zed for Laravel Starter Kit
A complete configuration kit for Zed Editor optimized for Laravel development. Get started with Laravel in Zed in seconds with pre-configured settings, snippets, tasks, and keyboard shortcuts.
🎨 Theme Options
Choose between two pre-configured themes during installation:
1. Default Theme (One Dark)
- Clean and modern One Dark color scheme
- Standard syntax highlighting
- Perfect for getting started quickly
2. Dracula Blurred Theme ⭐
-
Custom Dracula theme with enhanced colors
-
Optimized syntax highlighting for PHP and Laravel
-
Carefully tuned colors for:
-
PHP functions and methods (
#50fa7bgreen) -
Keywords and operators (
#ff79c6pink, bold) -
Types and classes (
#8be9fdcyan, italic) -
Strings (`#f1…
🚀 Zed for Laravel Starter Kit
A complete configuration kit for Zed Editor optimized for Laravel development. Get started with Laravel in Zed in seconds with pre-configured settings, snippets, tasks, and keyboard shortcuts.
🎨 Theme Options
Choose between two pre-configured themes during installation:
1. Default Theme (One Dark)
- Clean and modern One Dark color scheme
- Standard syntax highlighting
- Perfect for getting started quickly
2. Dracula Blurred Theme ⭐
-
Custom Dracula theme with enhanced colors
-
Optimized syntax highlighting for PHP and Laravel
-
Carefully tuned colors for:
-
PHP functions and methods (
#50fa7bgreen) -
Keywords and operators (
#ff79c6pink, bold) -
Types and classes (
#8be9fdcyan, italic) -
Strings (
#f1fa8cyellow) -
Comments (
#6272a4blue-gray, italic) -
Enhanced readability for long coding sessions
The installation script will prompt you to choose your preferred theme.
✨ Features
- 🎨 Laravel Pint Integration - Automatic code formatting on save
- 📝 200+ Snippets - PHP, Blade, Livewire, Pest, Filament, Inertia.js & Volt
- ⚡ Artisan Tasks - Pre-configured tasks for common Artisan commands
- ⌨️ Keyboard Shortcuts - Laravel-friendly keybindings
- 🔧 LSP Configuration - PHP language server optimized for Laravel
- 🎯 Blade Support - Full syntax highlighting and formatting
- 🔌 Auto Extension Install - Installs essential Zed extensions automatically
- 📦 Git Integration - Inline blame and gutter indicators
- 🚀 One-command Installation - Automated setup scripts
📋 Requirements
- Zed Editor (latest version)
- PHP 8.1+ with Intelephense or phpactor
- Laravel 10.x or 11.x project
- Laravel Pint installed in your project (
composer require laravel/pint --dev)
🔌 Included Extensions
These Zed extensions are automatically installed on first launch via the auto_install_extensions setting:
- PHP - PHP syntax highlighting and language server support
- Laravel Blade - Blade template syntax support
- Env - .env file syntax highlighting
- Tailwind CSS - Tailwind IntelliSense
Recommended optional extensions (install manually via Cmd/Ctrl + Shift + X):
Extensions will install automatically when you first launch Zed after installation. No manual action required! 🎉
🔧 Installation
Automatic Installation (Recommended)
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/croustibat/zed-for-laravel/main/scripts/install.sh | bash
Or download and run:
git clone https://github.com/croustibat/zed-for-laravel.git
cd zed-for-laravel
chmod +x scripts/install.sh
./scripts/install.sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/croustibat/zed-for-laravel/main/scripts/install.ps1 | iex
Or download and run:
git clone https://github.com/croustibat/zed-for-laravel.git
cd zed-for-laravel
.\scripts\install.ps1
Manual Installation
- Clone this repository
- Copy configuration files to your Zed config directory:
macOS / Linux:
cp settings.json ~/.config/zed/settings.json
cp keymap.json ~/.config/zed/keymap.json
cp tasks.json ~/.config/zed/tasks.json
cp -r snippets/* ~/.config/zed/snippets/
Windows:
Copy-Item settings.json $env:APPDATA\Zed\settings.json
Copy-Item keymap.json $env:APPDATA\Zed\keymap.json
Copy-Item tasks.json $env:APPDATA\Zed\tasks.json
Copy-Item -Recurse snippets\* $env:APPDATA\Zed\snippets\
📚 Usage
Snippets
All snippets support Tab completion. Type the prefix and press Tab to expand.
PHP Snippets
route→ Route definitioncontroller→ Controller classmodel→ Eloquent model with HasFactorymigration→ Migration classfactory→ Model factorytest→ PHPUnit test classrequest→ Form Request validationhasMany→ hasMany relationshipbelongsTo→ belongsTo relationshipbelongsToMany→ belongsToMany relationshipprovider→ Service Providerjob→ Queued Job class
Blade Snippets
@if→ If statement@foreach→ Foreach loop@forelse→ Forelse loop@switch→ Switch statement@extends→ Template extension@section→ Section definition@yield→ Yield contentcomponent→ Blade component@auth→ Auth check@guest→ Guest check@can→ Authorization check@csrf→ CSRF token@method→ HTTP method spoofing@error→ Validation error
Livewire 3 Snippets
livewire-component→ Full Livewire component classlivewire-property→ Public propertylivewire-validate→ Property with validation attributelivewire-mount→ Mount lifecycle hooklivewire-updated→ Updated lifecycle hooklivewire-action→ Action methodlivewire-dispatch→ Dispatch eventlivewire-on→ Event listener with attributewire:model→ Wire model directivewire:click→ Wire click directive
Pest Snippets (Testing)
pest-test→ Pest test functionpest-it→ Pest it functionpest-describe→ Describe blockpest-before→ beforeEach hookexpect→ Expect assertionpest-feature→ Feature test filepest-dataset→ Test with datasetpest-mock→ Mock a classpest-arch→ Architecture test
Filament Snippets (Admin Panel)
fil-resource→ Filament Resource classfil-text→ TextInput fieldfil-select→ Select fieldfil-select-rel→ Select with relationshipfil-toggle→ Toggle fieldfil-file→ File uploadfil-section→ Form sectionfil-repeater→ Repeater fieldfil-col-text→ Text columnfil-col-badge→ Badge columnfil-action→ Table actionfil-widget-stats→ Stats widgetfil-notify→ Notification
Inertia.js Snippets
inertia→ Inertia renderinertia-render→ Render with propsinertia-controller→ Full CRUD controllerinertia-vue-page→ Vue 3 page componentinertia-vue-form→ Vue form with useForminertia-useform→ useForm composableinertia-link→ Inertia Link componentinertia-react-page→ React page componentinertia-react-form→ React form component
Livewire Volt Snippets
volt→ Volt single-file componentvolt-class→ Class-based Volt componentvolt-state→ State declarationvolt-computed→ Computed propertyvolt-action→ Action functionvolt-mount→ Mount hookvolt-rules→ Validation rulesvolt-form→ Form with validationvolt-page→ Full page componentvolt-pagination→ Component with pagination
Tasks (Cmd/Ctrl + Shift + T)
Pre-configured tasks for common Laravel operations:
- Artisan Serve - Start development server
- Artisan Migrate - Run migrations
- Artisan Migrate Fresh - Fresh migration with seeding
- Artisan Tinker - Open Tinker REPL
- Artisan Route List - Display all routes
- Pint Format (All) - Format all PHP files
- Pint Format (Dirty) - Format only modified files
- PHPUnit - Run all tests
- PHPUnit (Current) - Run current test file
- NPM Dev - Start Vite dev server
- NPM Build - Build for production
- Composer Install - Install dependencies
- Composer Update - Update dependencies
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd/Ctrl + Shift + P | Command palette |
Cmd/Ctrl + Shift + I | Format document |
Cmd/Ctrl + T | Toggle terminal |
Cmd/Ctrl + Shift + T | Run task |
Cmd/Ctrl + B | Toggle sidebar |
Cmd/Ctrl + Shift + E | Project explorer |
🎨 Formatting
Laravel Pint is configured to run automatically on save for all PHP files. The configuration uses a bash wrapper to ensure compatibility:
"bash -c \"cat > {buffer_path} && ./vendor/bin/pint --quiet {buffer_path} && cat {buffer_path}\""
You can also manually format using:
- Keyboard:
Cmd/Ctrl + Shift + I - Command Palette: "Format Document"
- Task Runner: "Pint Format (All)" or "Pint Format (Dirty)"
📖 Documentation
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Zed Editor - The high-performance, multiplayer code editor
- Laravel - The PHP framework for web artisans
- Laravel Pint - Opinionated PHP code style fixer
💖 Support
If you find this project helpful, please consider:
- Starring the repository ⭐
- Sharing it with other Laravel developers
- Sponsoring the project
Made with ❤️ for the Laravel community