From 5bdf8469ea218a071ba91413b2b6518bac684b84 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 13 Oct 2016 14:50:22 +0200 Subject: Add php mode config --- emacs/.emacs.d/init.org | 7 +++++++ emacs/.emacs.d/init/php-mode-init.org | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 emacs/.emacs.d/init/php-mode-init.org (limited to 'emacs') 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 -- cgit v1.2.3-54-g00ecf