Files
confi-emacs-actual/configs/lang-php.el

52 lines
1.8 KiB
EmacsLisp

;;; lang-php.el --- Configuración para el lenguaje PHP -*- lexical-binding: t -*-
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;; Archivo de configuración para el lenguaje PHP
;;; Code:
(use-package php-ts-mode
:mode "\\.php\\'"
:ensure nil)
(use-package php-mode)
(use-package php-doc-block
:after php-ts-mode
:bind ("C-c d b" . php-doc-block)
:ensure (:host github :repo "moskalyovd/emacs-php-doc-block")
)
;; Consola REPL para php. Similar a "php -a" pero con extras
(use-package psysh)
;; Composer
(use-package composer)
;; PHPUnit
(use-package phpunit)
(use-package php-cs-fixer
:custom
(php-cs-fixer-rules-level-part-options (list (json-encode '(("@PSR12" . t)
("ordered_imports" . (("sort_algorithm" . "alpha")))
("concat_space" . (("spacing" . "one")))
("whitespace_after_comma_in_array" . t)
("align_multiline_comment" . t)
("no_unused_imports" . t)
("phpdoc_align" . t)
("phpdoc_indent" . t)
("no_useless_return" . t)
("return_assignment" . t)
("trailing_comma_in_multiline" . t)))))
(php-cs-fixer-rules-fixer-part-options '())
:hook (before-save . php-cs-fixer-before-save)
)
(provide 'lang-php)
;;; lang-php.el ends here