;;; web-settings.el --- Summary  -*- lexical-binding: t -*-

;;; Commentary:

;; Requirements:
;; js2-mode https://melpa.org/#/js2-mode
;;   tern (npm install -g tern)
;; php-mode https://melpa.org/#/php-mode
;; web-mode https://melpa.org/#/web-mode
;; company-web https://melpa.org/#/company-web
;;   web-completion-data https://melpa.org/#/web-completion-data

;;; Code:

(use-package css-mode
  :defer t
  :config
  (setq css-indent-offset 2))

(use-package js2-mode
  :commands js2-mode)

(use-package php-mode
  :commands php-mode)

(use-package web-mode
  :commands (web-mode))

(use-package web-completion-data
  :defer t)

(use-package company-web-html
  :after (web-mode company)
  :bind (([remap complete-symbol] . company-complete))  ;; M-C-i and <M-tab>
  :config
  ;;(add-to-list 'company-backends 'company-web-html)
  ;; Only use company-mode with company-web-html in web-mode
  (add-hook 'web-mode-hook
            (lambda ()
              (set (make-local-variable 'company-backends)
                   '(company-web-html company-capf company-files)))))

(provide 'web-settings)
;;; web-settings.el ends here
