Page 1 of 1

Is there any settings available for php code hint?

Posted: Mon Feb 23, 2015 8:17 pm
by manan88
Hello :)

I am a PHP developer and I am using codelite first time and I trying to understand all the features. But one thing I want to know first and that is PHP autocomplete function like $_GET, $_POST, $_SESSION etc just like dreamweaver.

Is this feature is available in codelite? If yes can you please gide me.

Re: Is there any settings available for php code hint?

Posted: Mon Feb 23, 2015 9:44 pm
by eranif
Hi,
CodeLite has a good completion for PHP files
We don't to claim to have code completion as Zend Studio or PHPStorm, but I will get there soon ;)

Here is the quick start tutorial for PHP:
http://codelite.org/LiteEditor/PHP

There are 2 levels of code completion:
  • The PHP builtin functions (such as: basename, define, PDO classes etc)
  • User code
The first (PHP builtin) is implemented by parsing a PHP stubs that CodeLite installs on your system under %appdata%\CodeLite\php-plugin\cc . This path is configured automatically for you and can be modified
from the main menu bar: PHP -> Settings -> Code Completion

The second is parsing your PHP project files and providing code completion based on the parsing results

Unfortunately, although I have included all (plus) PHP files for the basic PHP functions, I did not provide a stub for the PHP superglobals, however, this can be fixed with almost zero effort ( I already fixed this in git master ):

* Download the file SuperGlobals.php from here: https://github.com/eranif/codelite/blob ... lobals.php
* Save it under %appdata%\CodeLite\php-plugin\cc\SuperGlobals.php
* Right click on your workspace and select "Parse Workspace"
cc-parse-worspace.png
After adding and parsing the workspace, you should have this:
php-cc-3.png
Code completion for user code:
php-cc-1.png
PHP builtin classes/functions code completion:
php-cc-2.png
If you have more questions, feel free to ask

Eran