diff options
author | Tom Willemse | 2016-10-13 14:50:22 +0200 |
---|---|---|
committer | Tom Willemse | 2016-10-13 14:50:22 +0200 |
commit | 5bdf8469ea218a071ba91413b2b6518bac684b84 (patch) | |
tree | f080086a2389f0e410438aa8f76a0688aae010bd /emacs/.emacs.d | |
parent | 5c62bdc8507bbcfc889e8a65e9cff63d584d6015 (diff) | |
download | new-dotfiles-5bdf8469ea218a071ba91413b2b6518bac684b84.tar.gz new-dotfiles-5bdf8469ea218a071ba91413b2b6518bac684b84.zip |
Add php mode config
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r-- | emacs/.emacs.d/init.org | 7 | ||||
-rw-r--r-- | emacs/.emacs.d/init/php-mode-init.org | 19 |
2 files changed, 26 insertions, 0 deletions
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 |