Enable autocomplete or intellisense in Atom editor for PHP

I am the first Atom editor user for my PHP code. Atom can autocomplete PHP's built-in functions. Is it possible to make the editor autocomplete of my user function written in a separate file?

function.php

<?php
function printSomething() {
   echo "Hello World";
}

index.php

<?php
require_once "function.php";
printSomething(); // autocompleted by Atom editor while typing

Thanks in advance.

+4
source share
1 answer

The% userprofile% .atom file has a text file called snippets.cson. There you can add a fragment.

More on this: http://flight-manual.atom.io/using-atom/sections/snippets/

, . .

0

Source: https://habr.com/ru/post/1627329/


All Articles