Add php mode config

This commit is contained in:
Tom Willemse 2016-10-13 14:50:22 +02:00
parent 5c62bdc850
commit 5bdf8469ea
2 changed files with 26 additions and 0 deletions

View file

@ -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.

View file

@ -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