Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mago Laravel Package

carthage-software/mago

Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It brings Rust-inspired speed and reliability to PHP projects with a modern toolchain and great developer experience, plus multiple install options (script, Homebrew, Composer).

View on GitHub
Deep Wiki
Context7

title: Helix Editor recipe

🧩 Helix editor recipe

Integrate Mago directly with the Helix editor for fast, reliable, and automatic code formatting.

Prerequisites

  1. Mago Installed: Ensure you have installed Mago. If not, please follow the Installation Guide.
  2. PATH Configured: The mago executable must be available in your system's PATH. The recommended installation scripts handle this for you. You can verify this by running which mago in your terminal.

Configuration

You only need to add a few lines to your Helix languages.toml file.

  1. Locate your languages.toml file:

    • On Linux & macOS, it's typically at ~/.config/helix/languages.toml.
    • On Windows, it's typically at %AppData%\helix\languages.toml. If the file doesn't exist, you can create it.
  2. Add the Mago formatter configuration: Add the following TOML block to the end of the file. This will override the default formatter for PHP and enable formatting on save.

    # ~/.config/helix/languages.toml
    
    [[language]]
    name = "php"
    
    # Set Mago as the formatter.
    # This assumes your mago.toml file is in your current working directory.
    # If you work on multiple projects, consider using a .helix/languages.toml file in your project directory.
    formatter = { command = "mago", args = ["format", "--stdin-input"] }
    
    # Set to true to format automatically on save.
    auto-format = true
    

Usage

Once configured, Helix is ready to use Mago.

  • If auto-format = true, your PHP files will be formatted by Mago every time you save (:write or :w).
  • You can trigger formatting manually at any time by running the :format (or :fmt) command in Helix's command mode.

To verify the setup, open a .php file, misalign some code, and save the file. The code should snap into place as Mago formats it.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport