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.
Choose between two pre-configured themes during installation:
- Clean and modern One Dark color scheme
- Standard syntax highlighting
- Perfect for getting started quickly
- Custom Dracula theme with enhanced colors
- Optimized syntax highlighting for PHP and Laravel
- Carefully tuned colors for:
- PHP functions and methods (
#50fa7b
green) - Keywords and operators (
#ff79c6
pink, bold) - Types and classes (
#8be9fd
cyan, italic) - Strings (
#f1fa8c
yellow) - Comments (
#6272a4
blue-gray, italic)
- PHP functions and methods (
- Enhanced readability for long coding sessions
The installation script will prompt you to choose your preferred theme.
- 🎨 Laravel Pint Integration - Automatic code formatting on save
- 📝 130+ Snippets - PHP, Blade, and Livewire 3 snippets
- ⚡ 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
- 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
)
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! 🎉
curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/zed-for-laravel/main/scripts/install.sh | bash
Or download and run:
git clone https://github.com/YOUR_USERNAME/zed-for-laravel.git
cd zed-for-laravel
chmod +x scripts/install.sh
./scripts/install.sh
irm https://raw.githubusercontent.com/YOUR_USERNAME/zed-for-laravel/main/scripts/install.ps1 | iex
Or download and run:
git clone https://github.com/YOUR_USERNAME/zed-for-laravel.git
cd zed-for-laravel
.\scripts\install.ps1
- 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\
All snippets support Tab completion. Type the prefix and press Tab
to expand.
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
@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-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
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
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 |
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)"
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
This project is licensed under the MIT License - see the LICENSE file for details.
- Zed Editor - The high-performance, multiplayer code editor
- Laravel - The PHP framework for web artisans
- Laravel Pint - Opinionated PHP code style fixer
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