aboutsummaryrefslogtreecommitdiffstats
path: root/modules/init-php.el
blob: 469100fa9f49b5c9f378162a6affa512a2d1968c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;;; init-php.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;

;;; Code:
(use-package php-refactor-mode
  :pin "MELPA"
  :after (php-mode)
  :mode ("\\.php\\'" . php-mode)
  :hook
  (php-mode . php-refactor-mode))

(use-package php-mode
  :pin "MELPA"
  :ensure t)

(use-package company-php
  :pin "MELPA"
  :ensure t
  :config
  (defun cfg:php-mode-hook ()
    (interactive)
    (require 'company-php)
    (company-mode t)
    (add-to-list 'company-backends 'company-ac-php-backend))

  (add-hook 'php-mode-hook 'cfg:php-mode-hook))

(add-hook 'php-mode-hook (lambda () (subword-mode 1)))

(provide 'init-php)
;;; init-php.el ends here