 ;;; lang/php/config.el -*- lexical-binding: t; -*-
+
+(defvar +php--company-backends nil)
 
 ;; (def-package! hack-mode
 ;;   :mode "\\.hh$"



(def-package! php-mode
  :mode "\\.php[s345]?$"
  :mode "\\.inc$"
  :interpreter "php"
  :config
  (add-hook 'php-mode-hook #'ac-php-core-eldoc-setup)

  ;; Disable HTML compatibility in php-mode. `web-mode' has superior support for
  ;; php+html. Use the .phtml
  (setq php-template-compatibility nil)

          :n "s"  #'phpunit-current-test)))


(def-package! php-refactor-mode
  :hook php-mode)


(def-package! php-extras
  :after php-mode
  :init
  ;; company will set up itself
  (advice-add #'php-extras-company-setup :override #'ignore)
  (add-to-list '+php--company-backends 'php-extras-company nil #'eq)
  :config
  (setq php-extras-eldoc-functions-file
        (concat doom-etc-dir "php-extras-eldoc-functions"))
