diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 5e19ee8..0562224 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -700,6 +700,13 @@ To start off, first I need to enable lexical binding. (with-eval-after-load 'js (load "js-mode-init")) #+END_SRC + - [[file:init/php-mode-init.org][php-mode]] :: I use PHP mode for files that only contain PHP code, + no HTML or anything. + + #+BEGIN_SRC emacs-lisp + (with-eval-after-load 'php-mode (load "php-mode-init")) + #+END_SRC + ** Emacs lisp mode Enable paredit mode. diff --git a/emacs/.emacs.d/init/php-mode-init.org b/emacs/.emacs.d/init/php-mode-init.org new file mode 100644 index 0000000..a8bbcb3 --- /dev/null +++ b/emacs/.emacs.d/init/php-mode-init.org @@ -0,0 +1,19 @@ +#+TITLE: PHP + +Turn on electric pairing in php-mode. + +#+BEGIN_SRC emacs-lisp + (add-hook 'php-mode-hook 'electric-pair-local-mode) +#+END_SRC + +Turn on electric indenting in php-mode. + +#+BEGIN_SRC emacs-lisp + (add-hook 'php-mode-hook 'electric-indent-local-mode) +#+END_SRC + +Enable flycheck in php-mode. + +#+BEGIN_SRC emacs-lisp + (add-hook 'php-mode-hook 'flycheck-mode) +#+END_SRC