One of Laravel's killer features is Ignition, a gorgeous error screen made by the good people at Spatie. Ignition shows the entire call stack, and if you hover over a line of code, you can click a pencil icon to take you to that exact line in a code editor. Unfortunately for me, the default editor is set to PhpStorm and I'm an avid VS Code user.
Thankfully, changing the default code editor is straightforward. Open your project's .env
file and add IGNITION_EDITOR
as an environment variable.
# Supported editors include "phpstorm", "vscode", "vscode-insiders",
# "sublime", "atom" and "nova"
IGNITION_EDITOR="vscode"
Changing other Ignition settings
To see all of Ignition's configuration, visit the Ignition installation page and follow along with the section about publishing configuration files. Running the command to publish your config files will create config/ignition.php
within your project, which includes full notes about each setting.
If you'd rather just use your .env
file for configuration, copy the config/ignition.php
settings into your .env
file, then delete Ignition's config file when you're done. Everything will continue to work.
I hope this post saved you some time!
Top comments (2)
Thank you so much for the post! 🙌 Ignition is indeed an amazing feature in Laravel, and the tip to change the default editor is incredibly helpful. As a fellow VS Code user, this information is gold. Keep sharing valuable knowledge like this – highly appreciated! 👏✨
I'm glad this helped you!