Add php mode config
This commit is contained in:
parent
5c62bdc850
commit
5bdf8469ea
2 changed files with 26 additions and 0 deletions
|
@ -700,6 +700,13 @@ To start off, first I need to enable lexical binding.
|
||||||
(with-eval-after-load 'js (load "js-mode-init"))
|
(with-eval-after-load 'js (load "js-mode-init"))
|
||||||
#+END_SRC
|
#+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
|
** Emacs lisp mode
|
||||||
|
|
||||||
Enable paredit mode.
|
Enable paredit mode.
|
||||||
|
|
19
emacs/.emacs.d/init/php-mode-init.org
Normal file
19
emacs/.emacs.d/init/php-mode-init.org
Normal 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
|
Loading…
Reference in a new issue