Install PHP plugin for Atom editor

Asked

Viewed 1,735 times

1

I’ve installed several Plugins of Atom to enable resources to recognize syntax of PHP in my project, but I didn’t succeed, what is my goal? And when I type the code it can complete, see the example below;

@foreach($courses as $course)
    <div class="col-md-3">
        <h3>{{ $course->name }}</h3>
        <p>{{ $course->description }}</p>
    </div>
@endforeach

In the example, with the plugin installed it was for when I type @forea... and he complete.

I just need to know which plugin to install in the Atom Editor.


With the suggestions he’s given me he’s like this, but it’s not the way I need it;

When typing the @fore.. he wasn’t supposed to have put the <?php ?>

@<?php foreach ($variable as $key => $value): ?>

<?php endforeach; ?>
  • I use very little php, and use the language-php, but he can’t identify the classes to suggest in the autocomplete, the rest I have nothing to complain

  • If this is the Blade templating engine of Laravel, which is what it seems to me, there is a plugin for this in Atom which is the language-blade that works well

  • I updated my post, could you take a look please.

2 answers

1


Linter PHP would be a good solution, but it was a temporary gambiarra. Thanks to Nuclide, a very active and powerful community adopted by Facebook, now what was only an editor, has turned into a true IDE.

To make your Atom Editor become an official IDE, it’s very easy. Come with me and follow the steps below:

Install the package Atom-ide-ui Install your favorite language pack. In this case, PHP: ide-php I wrote an article doing a review and a more cool comment of the Atom IDE tool. Visit this link for more information.

0

Assuming you are asking for a plugin for Blade Templating Engine in Laravel, There are several in Atom.

One that I use and works well is the Laravel-Blade:

inserir a descrição da imagem aqui

Not only marks the syntax with the correct colors, but also automatically completes the keywords:

inserir a descrição da imagem aqui

  • I typed in the settings of Atom but he did not find the Laravel-Lade, will be that it is to stay trying until finding?

  • @wladyband It’s called "language-Blade". And remember it only works on a Blade file, with extension .blade.php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.