Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature is for execute PHP code formatting tools.
Supported tools:
It supports both per-project and globally installed ones.
How to use
Add following line to setup function for php-mode.
(php-format-auto-mode +1)
Customization
These variables can be set either by dir-locals.el or by custom-set-variable.
php-format-auto-mode-hook-depth
php-format-command
php-format-command-dir
php-format-default-idle-time
php-format-result-display-method-alist
Display methods
How formatting is performed and how the results are displayed can be controlled by the following keywords.
idle
: Asynchronously apply formatting to idle time in Emacs using `run-with-idle-timer'async
: Immediately execute an asynchronous process to apply formattingcompile
: Apply formatting using the compile command. Doesn't lock, but results pop upsilent
: Apply formatting immediately and synchronously. No message is displayed, but Emacs is locked while it is being processed.nil
: Apply formatting immediately and synchronously. Emacs will be locked until formatting is done and the result will pop up.