 (defun madand-web/post-init-web-mode ()
   (spacemacs/set-leader-keys-for-major-mode 'web-mode
     "w" #'madand/toggle-php-web-mode)
-
   (add-to-list 'auto-mode-alist
                '("/\\(views\\|common/mail\\)/.*\\.php\\'" . web-mode))
-
   (add-hook 'web-mode-hook #'madand/disable-rainbow-identifiers))
 
-(defun madand-web/post-init-projectile ()
-  (with-eval-after-load 'projectile
-    (projectile-register-project-type 'madand-nodeapp nil
-                                      :compile "npm run build"
-                                      :test "npm run test"
-                                      :run "npm run start")
-    (setq projectile-test-suffix-function
-          (madand//projectile-test-suffix projectile-test-suffix-function))))
-
-(defun madand-web/init-php-refactor-mode ()
-  (use-package php-refactor-mode
-    :defer t
-    :init
-    (progn
-      (setq
-       php-refactor-command (expand-file-name "~/.composer/vendor/bin/refactor"))
-
-      (dolist (prefix '(("mr" . "refactor")
-                        ("mrl" . "local variable")
-                        ("mrr" . "rename")
-                        ("mre" . "extract")
-                        ("mro" . "optimize")))
-        (spacemacs/declare-prefix-for-mode 'php-mode (car prefix) (cdr prefix)))
-      (spacemacs/set-leader-keys-for-major-mode 'php-mode
-        "rli" #'php-refactor--convert-local-to-instance-variable
-        "rrv" #'php-refactor--rename-local-variable
-        "rem" #'php-refactor--extract-method
-        "rou" #'php-refactor--optimize-use)
-
-      (add-hook 'php-mode-hook #'php-refactor-mode))
-    :config
-    (spacemacs|hide-lighter php-refactor-mode)))
-
 ;;; packages.el ends here

  (push '(company-ac-php-backend company-keywords company-dabbrev-code)
        company-backends-php-mode))

(defun madand-web/init-ede-php-autoload ()
  (use-package ede-php-autoload
    :defer t
    :after php-mode)
  (add-hook 'php-mode-hook #'ede-php-autoload-mode))

(defun madand-web/init-geben ()
  (use-package geben
    :defer t
    :after php-mode
    :config
    (progn
      (setq geben-display-window-function 'popwin:display-buffer
            geben-path-mappings  '(("/home/madand/dev/php/rentling/app" "/app")))
      (evil-set-initial-state 'geben-mode 'emacs))))

(defun madand-web/post-init-flycheck ()
  (setq flycheck-phpcs-standard "PSR2"

                (add-hook 'after-save-hook #'madand/php-after-save nil t)))))

(defun madand-web/post-init-php-mode ()
  (setq php-template-compatibility nil
        php-manual-path "/usr/share/doc/php/php-chunked-xhtml"
        php-search-documentation-browser-function #'madand/browse-url-eww
        php-mode-coding-style 'psr2)

  (evil-define-key 'hybrid c-mode-map (kbd "RET") (kbd "M-j"))
  ;; Shortcuts for common yet cumbersome things.
