PhpStorm Envoy Blade Template Highlighting

Published 4 months ago by jjanusch

We're using Envoy for deployments, but don't normally use Blade at all. For some reason, our PhpStorm installations do not properly highlight the code written inside @setup and @task blocks and PhpStorm fails to properly indent them (just pushes them all to the left edge). We do have both the Blade Support and Laravel plugins installed and have also tinkered around setting up new Blade Directives in the Preferences, but we still do not see any highlighting (it's as if everything after @task is seen as plaintext). Here is an example of an in-progress deployment script I am working on updating right now:

@task('deploy', [ 'on' => $server ])
    cd ~/www || exit 1

    export RELEASE="$(date +'%Y%m%d%H%M%S')"

    mkdir -p "releases/$RELEASE" && \
    rsync -a ~/www/current/ "releases/$RELEASE" && \
    cd releases/$RELEASE && \
    git fetch --all

    @if ($branch)
        git checkout {{ $branch }} && \
        git pull origin {{ $branch }}
        git checkout master && \
        git pull origin master

It also happens inside the @setup block which is just running regular PHP, not bash

Everything after the @task is just plaintext in the IDE, unfortunately. Does anyone know how to enable proper PhpStorm formatting for these items?


What is the extension of the file? I believe the it only formats correctly for .blade.php files!


The file is named Envoy.blade.php and I have already checked the file association settings and they are fine. Other Blade directives work fine (even in that file). Just not the Envoy-specific directives

4 months ago (574,260 XP)

You have to add them manually. Envoyer tags are not included in the regular laravel blade tags:


@Cronix Yeah, I was able to add them but I think I am missing something with regards to the prefix/suffix because it makes little difference other than highlighting the actual directive (plus the parenthesis content for @servers)

4 months ago (574,260 XP)

I wouldn't expect it would highlight your code in between the tags, since it's bash and not php?

You could try the bash support plugin:


I do have that plugin installed. It's not just Bash code that is failing to highlight here, though. Even PHP is failing.

PHP Block Example

Please sign in or create an account to participate in this conversation.