            (set-face-background 'mode-line (car color))
            (set-face-foreground 'mode-line (cdr color))))))
 
+;; Add ac-source-dictionary to ac-sources of all buffer
+(defun ac-js-setup ()
+  (setq ac-sources (append ac-sources '(ac-source-tern-completion))))
+
+(add-hook 'js-mode 'ac-js-setup)
+
 (custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.

 ;; If there is more than one, they won't work right.
 '(package-selected-packages
   (quote
    (flycheck powerline discover-my-major evil-search-highlight-persist evil-mc evil-org evil-tabs helm evil-visualstar evil-surround evil-numbers evil-nerd-commenter evil-matchit evil-mark-replace evil-leader evil-extra-operator evil-exchange evil-easymotion evil-args color-theme-approximate))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.

(powerline-default-theme)
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
(setq-default tab-width 4 indent-tabs-mode nil)
(define-key global-map (kbd "RET") 'newline-and-indent)
(ac-config-default)

(global-flycheck-mode)
(add-hook 'after-init-hook #'global-flycheck-mode)
