Hey guys,
Your ide really seems like a great piece of software.
I am coming from netbeans and in netbeans it would be possible to configure the auto format to format according to some rules.
For example, I would go to this website: https://maniaplanet.github.io/netbeans-psr/ and just import the settings for the formater and have my php code all nicely formated according to the PSR conventions.
I did look at the plugin "Source code formatter" but the options seemed a bit simple. Is there any other plugin that would allow me to customize how the auto formatter works a bit more in-depth?
Better auto format rules
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Dec 14, 2015 4:57 pm
- Genuine User: Yes
- IDE Question: PHP
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Better auto format rules
CodeLite supports 2 foramtters for PHP:
The built-in formatter which is a simple formatter with not much rules
The second is called PHP-CS-Fixer https://github.com/FriendsOfPHP/PHP-CS-Fixer which you can configure with many options
Have you tried using the later?
Eran
The built-in formatter which is a simple formatter with not much rules
The second is called PHP-CS-Fixer https://github.com/FriendsOfPHP/PHP-CS-Fixer which you can configure with many options
Have you tried using the later?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Dec 14, 2015 4:57 pm
- Genuine User: Yes
- IDE Question: PHP
- Contact:
Re: Better auto format rules
I can try, but you pointed to a php github repo.
I am confused.. does code lite have some configuration dialog for this?
I am confused.. does code lite have some configuration dialog for this?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Better auto format rules
plugins->source code formatter
In the "General" page, select under "PHP Formatter" select the "PHP-CS-Fixer" option.
Next, configure the the code PHP-CS-Fixer: plugins->source code formatter->php->php-cs-fixer:
PHP Executable: select the PHP executable
PHP-CS-Fixer phar file: select the path to the phar file
and then you can add arguments from the link I provided
Eran
In the "General" page, select under "PHP Formatter" select the "PHP-CS-Fixer" option.
Next, configure the the code PHP-CS-Fixer: plugins->source code formatter->php->php-cs-fixer:
PHP Executable: select the PHP executable
PHP-CS-Fixer phar file: select the path to the phar file
and then you can add arguments from the link I provided
Eran
Make sure you have read the HOW TO POST thread