 		      :background "black"
 		      :box '(:color "black" :line-width 6)))
 
-
-(use-package volatile-highlights
-  :ensure
-  :diminish volatile-highlights-mode
-  :init (volatile-highlights-mode t))
-
 (use-package highlight-numbers
   :ensure
   :diminish highlight-numbers-mode

    :bind ("M-x" . smex)))


(use-package company
  :ensure
  :idle (global-company-mode t)
  :config
  (progn
    (define-key company-mode-map (kbd "C-n") 'company-select-next)
    (define-key company-mode-map (kbd "C-p") 'company-select-previous)
    (define-key company-active-map (kbd "C-d") 'company-show-doc-buffer)

  :config
  (progn 
    (evil-mode t)
    (evil-add-hjkl-bindings magit-status-mode-map 'emacs
      ":" 'evil-ex
      "K" 'magit-discard-item
      "l" 'magit-key-mode-popup-logging
      "h" 'magit-diff-toggle-refine-hunk)
    ;; move RET and SPC from motion state to normal state
    (mapcar
     (lambda (k)
       (define-key evil-normal-state-map k (lookup-key evil-motion-state-map k))
       (define-key evil-motion-state-map k nil))
     (list (kbd "RET") " "))
    ;; ex-mode shortcuts
    (define-key evil-ex-map "e " 'ido-find-file)
    (define-key evil-ex-map "b " 'ido-switch-buffer)
    (define-key evil-ex-map "pf " 'projectile-find-file)
    (define-key evil-ex-map "pp " 'projectile-switch-project)
    (define-key evil-ex-map "pa " 'projectile-ag)
    (define-key evil-ex-map "pb " 'projectile-switch-to-buffer)
    (define-key evil-ex-map "po " 'projectile-find-other-file)
    ;; Vim-ism ;]
    (define-key evil-normal-state-map "Y" (kbd "y$"))
    ;; ESC exit from anywhere
    (define-key evil-normal-state-map [escape] 'keyboard-quit)
    (define-key evil-visual-state-map [escape] 'keyboard-quit)
    (define-key minibuffer-local-map [escape] 'abort-recursive-edit)
    (define-key minibuffer-local-ns-map [escape] 'abort-recursive-edit)
    (define-key minibuffer-local-completion-map [escape] 'abort-recursive-edit)
    (define-key minibuffer-local-must-match-map [escape] 'abort-recursive-edit)
    (define-key minibuffer-local-isearch-map [escape] 'abort-recursive-edit))
  (use-package evil-visualstar
    :ensure)
  (use-package evil-jumper
    :ensure)
  (use-package evil-matchit
    :ensure)
  (use-package evil-surround
    :ensure
    :commands global-evil-surround-mode
    :idle (global-evil-surround-mode)
    :config
    (setq-default surround-pairs-alist
		  '((?\( . ("(" . ")"))
		    (?\[ . ("[" . "]"))
		    (?\{ . ("{" . "}"))
		    (?\) . ("( " . " )"))
		    (?\] . ("[ " . " ]"))
		    (?\} . ("{ " . " }"))
		    (?# . ("#{" . "}"))
		    (?b . ("(" . ")"))
		    (?B . ("{" . "}"))
		    (?> . ("<" . ">"))
		    (?t . evil-surround-read-tag)
		    (?< . evil-surround-read-tag)
		    (?f . evil-surround-function)))))

;(use-package vi-tilde-fringe-mode
;  :ensure)

;; Per languages
;(add-hook 'prog-mode-hook 'vi-tilde-fringe-mode)

(use-package highlight-parentheses
  :init
  (progn 
    (add-hook 'emacs-lisp-mode-hook (lambda()
				      (eldoc-mode t)))))
(use-package highlight-parentheses
  :init
  (progn 
    (add-hook 'emacs-lisp-mode-hook (lambda()
				      (electric-pair-mode t)))))
(use-package highlight-parentheses
  :ensure
  :init
  (progn 
    (add-hook 'emacs-lisp-mode-hook (lambda()
				      (highlight-parentheses-mode t)))))
(use-package rainbow-delimiters
  :ensure
  :init
  (progn 
    (add-hook 'emacs-lisp-mode-hook (lambda()
				      (rainbow-delimiters-mode t)))))

(use-package rainbow-mode
  :ensure
  :init
  (progn 
    (add-hook 'emacs-lisp-mode-hook (lambda()
				      (rainbow-mode t)))
    (add-hook 'css-mode-hook (lambda()
				      (rainbow-mode t)))
    (add-hook 'html-mode-hook (lambda()
				      (rainbow-mode t)))))

(use-package js2-mode
  :ensure
