DEV Community

Baptiste Bouillot
Baptiste Bouillot

Posted on • Originally published at github.com

Zed for Laravel - Complete Editor Setup in One Command

Setting up a code editor for Laravel development can be time-consuming. After switching to Zed - the lightning-fast editor from Atom's creators - I spent weeks configuring it perfectly for Laravel.

Today, I'm open-sourcing that configuration as Zed for Laravel - a one-command installer that sets up everything you need.

πŸ€” What's Zed?

If you haven't heard of Zed yet, it's a high-performance code editor built in Rust with:

  • ⚑ Blazing fast performance - noticeably faster than VS Code
  • 🀝 Built-in multiplayer - collaborate like in Google Docs
  • 🎯 Minimal & focused - less bloat, more productivity
  • πŸ†“ Free & open-source

Perfect for Laravel development once properly configured.

🎯 The Problem

When I first tried Zed for Laravel, I hit several roadblocks:

  1. Laravel Pint wouldn't format on save
  2. No Laravel snippets out of the box
  3. Blade syntax needed configuration
  4. Artisan commands required manual terminal work
  5. Extensions had to be found and installed individually

Each issue took hours to solve. So I packaged all solutions into a single installer.

✨ Features

🎨 Dual Theme System

Choose your visual experience during installation:

Default (One Dark)

  • Clean, familiar colors
  • Standard syntax highlighting
  • Great for getting started

Catppuccin blur (Custom)

  • 30+ syntax overrides optimized for PHP/Laravel
  • Bold keywords for quick scanning
  • Italic types for elegant distinction
  • Bright green functions (Laravel helpers pop!)
  • Reduced eye strain for long sessions

πŸ“ 130+ Smart Snippets

PHP Snippets (50+)

// route + Tab
Route::get('uri', [Controller::class, 'method'])->name('name');

// model + Tab
class ModelName extends Model
{
    use HasFactory;
    protected $fillable = ['name'];
}

// hasMany + Tab
public function posts()
{
    return $this->hasMany(Post::class);
}

// request + Tab
class StoreUserRequest extends FormRequest
{
    public function rules(): array
    {
        return ['field' => 'required|string|max:255'];
    }
}
Enter fullscreen mode Exit fullscreen mode

Full list: controllers, models, migrations, factories, tests, policies, jobs, events, listeners, middleware, seeders, and more.

Blade Snippets (40+)

<!-- @foreach + Tab -->
@foreach ($items as $item)
    {{ $item->name }}
@endforeach

<!-- component + Tab -->
<x-alert :type="success">
    Message here
</x-alert>

<!-- @auth + Tab -->
@auth
    <p>Welcome, {{ auth()->user()->name }}</p>
@endauth
Enter fullscreen mode Exit fullscreen mode

All Blade directives included: @if, @forelse, @switch, @extends, @section, @include, @can, @error, and more.

Livewire 3 Snippets (30+)

// livewire-component + Tab
class ComponentName extends Component
{
    public $property;

    public function render()
    {
        return view('livewire.component-name');
    }
}

// livewire-validate + Tab
#[Validate('required|string|max:255')]
public string $email = '';

// livewire-on + Tab
#[On('user-updated')]
public function handleUserUpdate($userId)
{
    // Handle event
}
Enter fullscreen mode Exit fullscreen mode

Full Livewire 3 support with properties, lifecycle hooks, events, wire directives, computed properties, and forms.

⚑ Laravel Pint Integration

Automatic code formatting on every save. The kit uses a reliable bash wrapper:

{
  "formatter": {
    "external": {
      "command": "bash",
      "arguments": [
        "-c",
        "cat > {buffer_path} && ./vendor/bin/pint --quiet {buffer_path} && cat {buffer_path}"
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Respects your project's pint.json configuration and Laravel coding standards.

πŸ”§ 25 Artisan Tasks

Press Cmd/Ctrl + Shift + T to access:

Development:

  • Artisan Serve
  • Artisan Tinker
  • Artisan Route List
  • Artisan Queue Work

Database:

  • Artisan Migrate
  • Artisan Migrate Fresh (with seeding)
  • Artisan Migrate Rollback

Testing:

  • PHPUnit (all tests)
  • PHPUnit (current file)
  • PHPUnit (parallel)
  • PHPUnit (with coverage)
  • Pest (all tests)

Code Quality:

  • Pint Format (all files)
  • Pint Format (dirty files only)
  • Pint Test (check without formatting)

Frontend:

  • NPM Dev (Vite)
  • NPM Build (production)

Dependencies:

  • Composer Install
  • Composer Update
  • Composer Dump Autoload

πŸ”Œ Auto-Installing Extensions

Four essential extensions install automatically on first launch:

  • PHP - Full language server support
  • Laravel Blade - Template syntax highlighting
  • Env - .env file syntax support
  • Tailwind CSS - IntelliSense for Tailwind classes

No manual searching or clicking required.

⌨️ Optimized Keybindings

Laravel-friendly keyboard shortcuts:

Shortcut Action
Cmd/Ctrl + Shift + I Format with Pint
Cmd/Ctrl + Shift + T Run Artisan task
Cmd/Ctrl + T Toggle terminal
Cmd/Ctrl + Shift + P Command palette
Cmd/Ctrl + B Toggle sidebar

All familiar shortcuts that feel natural.

πŸš€ Installation

Quick Install

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/croustibat/zed-for-laravel/main/scripts/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Windows (PowerShell):

irm https://raw.githubusercontent.com/croustibat/zed-for-laravel/main/scripts/install.ps1 | iex
Enter fullscreen mode Exit fullscreen mode

What Happens

  1. βœ… Backs up your existing Zed configuration
  2. 🎨 Prompts you to choose a theme (Default or Dracula Pro)
  3. πŸ“‹ Installs all configuration files
  4. πŸ“ Installs 130+ snippets
  5. ⚑ Configures Laravel Pint
  6. πŸ”§ Sets up Artisan tasks
  7. πŸ”Œ Queues extensions for auto-install

Time: ~30 seconds

Restart Zed and you're ready to code!

Manual Installation

Prefer doing it manually? Full instructions in the installation guide.

πŸ“– Complete Documentation

The kit includes comprehensive guides:

πŸ’‘ Why I Built This

After years with VS Code, I wanted something faster. Zed's performance is incredible, but the Laravel setup was fragmented across GitHub issues, forums, and documentation.

I wanted a single source of truth - one command that sets up everything perfectly.

🎯 Perfect For

  • Laravel developers wanting to try Zed
  • Zed users starting Laravel development
  • Development teams needing consistent setup
  • Anyone tired of slow editors or complex configuration

πŸ—ΊοΈ Roadmap

Planning future releases:

v1.1 - Extended snippets

  • Pest-specific snippets
  • Inertia.js (Vue/React)
  • API Resource snippets

v1.2 - More themes

  • Nord (arctic calm)
  • Gruvbox (retro groove)
  • Tokyo Night (cyberpunk)

v2.0 - Advanced features

  • Laravel Pint config generator
  • Project scaffolding templates
  • Team sync features

🀝 Contributing

This is an open-source project and contributions are welcome!

GitHub: https://github.com/croustibat/zed-for-laravel

Ways to contribute:

  • ⭐ Star the repository
  • πŸ› Report bugs or issues
  • πŸ’‘ Suggest features
  • 🀝 Submit pull requests
  • πŸ“– Improve documentation
  • πŸ’¬ Help others in discussions

🏁 Getting Started

Ready to try it? Here's a quick start:

# 1. Install Zed for Laravel
curl -fsSL https://raw.githubusercontent.com/croustibat/zed-for-laravel/main/scripts/install.sh | bash

# 2. Choose your theme (I recommend Dracula Pro for Laravel)

# 3. Restart Zed

# 4. Open your Laravel project

# 5. Try a snippet: type 'route' and press Tab

# 6. Save a PHP file to see Pint auto-format

# 7. Press Cmd+Shift+T to run Artisan commands
Enter fullscreen mode Exit fullscreen mode

That's it! You're configured for Laravel development.

πŸ”— Links

πŸ™ Acknowledgments

Thanks to:

  • The Zed team for creating an amazing editor
  • The Laravel community for feedback and inspiration
  • Catppuccin theme creators for the beautiful color scheme
  • All contributors who help improve the project

πŸ’­ Final Thoughts

Switching editors is always a bit scary. Will I lose productivity? Will I miss features?

With Zed for Laravel, the transition is smooth. Everything works on day one. The speed improvement alone makes it worth trying.

Give it a shot! If it's not for you, uninstalling is just deleting ~/.config/zed/. No commitment, no vendor lock-in.

Happy coding! πŸš€


What editor do you use for Laravel development? Have you tried Zed? Let me know in the comments!


Tags: #laravel #php #zed #productivity #webdev #opensource #developer #coding

Top comments (1)

Collapse
 
xwero profile image
david duymelinck

Is it correct that I didn't see debug configuration?