๐ 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