Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 2.37 KB

File metadata and controls

37 lines (32 loc) · 2.37 KB

PIMacs/lang-php Doom Emacs Module

This package provide extra configurations of the default Doom Emacs configuration for PHP code editing and extend this configuration to the Emacs native php-ts-mode based on the equally Emacs native Tree Sitter.

Features

  • If the module pimacs/treesit is loaded and the Emacs version is greater than 30, this module use and configure the Emacs native php-ts-mode.
  • With the +php-cs-fixer module option, use the php-cs-fixer formater even when lsp-mode is enabled (replace prettier used by format-all).
  • Enable php-fh for highlight the native PHP functions names. This is disabled with the module option +no-php-fh option or if your use Emacs native Tree sitter solution.
  • When :lang php is not loaded with the option =+lsp=, configure the package phpactor
  • Check and install automatically the needed binary softwares (disabled with module option +no-dep) :
    • PHPStan scans your whole codebase and looks for both obvious & tricky bugs.
    • PHPUnit is a programmer-oriented testing framework for PHP.
    • phpctags : is an enhanced ctags compatible index generator written in pure PHP.
    • PHP CS Fixer is a tool to automatically fix PHP Coding Standards issues.
    • PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
    • Prettier is an opinionated code formatter.

Key bindings

See the the key bindings added by this package.

Module Options

  • +php-cs-fixer : to force the formatting system to usage PHP CS Fixer.
  • +no-dep : to disable checking and auto-installing binary dependencies.
  • +no-php-fh : to not load php-fh because of his potential intensive CPU usage.
  • +lsp (recommended): configure the Langage Server Protocol for php-mode and php-ts-mode.