Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: php-format.el #731

Merged
merged 1 commit into from
Mar 5, 2023
Merged

New feature: php-format.el #731

merged 1 commit into from
Mar 5, 2023

Conversation

zonuexe
Copy link
Member

@zonuexe zonuexe commented Mar 5, 2023

Note
This is an experimental feature. We are looking for your feedback to improve the usability.

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 formatting
  • compile: Apply formatting using the compile command. Doesn't lock, but results pop up
  • silent: 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.

@zonuexe zonuexe merged commit 5b77ff6 into master Mar 5, 2023
@zonuexe zonuexe deleted the feature/php-format branch March 5, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant