      `(company-preview             ((,c (:foreground ,blue))))
      `(company-preview-common      ((,c (:foreground ,magenta :background ,grey-d))))
      `(company-preview-search      ((,c (:inherit company-tooltip-search))))
+     ;; diff-hl
+     `(diff-hl-change              ((,c (:foreground ,vc-modified))))
+     `(diff-hl-delete              ((,c (:foreground ,vc-deleted))))
+     `(diff-hl-insert              ((,c (:foreground ,vc-added))))
+     ;; evil-mode
+     `(evil-ex-substitute-matches                   ((,c (:background ,black :foreground ,red :strike-through t :bold ,bold))))
+     `(evil-ex-substitute-replacement               ((,c (:background ,black :foreground ,green :bold ,bold))))
+     `(evil-search-highlight-persist-highlight-face ((,c (:inherit isearch-lazy-highlight-face))))
+     ;; evil-snipe
+     `(evil-snipe-first-match-face ((,c (:foreground ,search-bg :background ,blue-d))))
+     `(evil-snipe-matches-face     ((,c (:foreground ,search-bg :underline t :bold ,bold))))
+     ;; flycheck
+     `(flycheck-error     ((,c (:underline (:style wave :color ,red)    :background ,bg-d))))
+     `(flycheck-warning   ((,c (:underline (:style wave :color ,yellow) :background ,bg-d))))
+     `(flycheck-info      ((,c (:underline (:style wave :color ,green)  :background ,bg-d))))
+     `(flyspell-incorrect ((,c (:underline (:style wave :color ,red) :inherit unspecified))))
+     ;; git-gutter
+     `(git-gutter:modified         ((,c (:foreground ,vc-modified))))
+     `(git-gutter:added            ((,c (:foreground ,vc-added))))
+     `(git-gutter:deleted          ((,c (:foreground ,vc-deleted))))
+     `(git-gutter+-modified        ((,c (:foreground ,vc-modified))))
+     `(git-gutter+-added           ((,c (:foreground ,vc-added))))
+     `(git-gutter+-deleted         ((,c (:foreground ,vc-deleted))))
+     ;; Helm
+     `(helm-selection              ((,c (:background ,selection))))
+     `(helm-match                  ((,c (:foreground ,blue :underline t))))
+     `(helm-source-header          ((,c (:background ,current-line :foreground ,grey-l))))
+     `(helm-swoop-target-line-face ((,c (:foreground ,highlight :inverse-video t))))
+     `(helm-ff-file                ((,c (:foreground ,fg))))
+     `(helm-ff-prefix              ((,c (:foreground ,magenta))))
+     `(helm-ff-dotted-directory    ((,c (:foreground ,grey-d))))
+     `(helm-ff-directory           ((,c (:foreground ,orange))))
+     `(helm-ff-executable          ((,c (:foreground ,white :slant italic))))
+     ;; indent-guide, highlight-{quoted,numbers,indentation}-mode
+     `(indent-guide-face                         ((,c (:foreground "#2F2F38"))))
+     `(highlight-indentation-face                ((,c (:background "#222830"))))
+     `(highlight-indentation-current-column-face ((,c (:background "#222830"))))
+     `(highlight-indentation-guides-odd-face     ((,c (:background ,bg))))
+     `(highlight-indentation-guides-even-face    ((,c (:background "#222830"))))
+     `(highlight-quoted-symbol                   ((,c (:foreground ,type))))
+     `(highlight-quoted-quote                    ((,c (:foreground ,operators))))
+     `(highlight-numbers-number                  ((,c (:foreground ,constants))))
+     ;; hide-show
+     `(hs-face            ((,c (:foreground ,comments :background ,black))))
+     `(hs-fringe-face     ((,c (:foreground ,blue))))
+     ;; iedit
+     `(iedit-occurrence           ((,c (:foreground ,magenta :bold ,bold :inverse-video t))))
+     `(iedit-read-only-occurrence ((,c (:inherit region))))
+     ;; neotree
+     `(neo-root-dir-face           ((,c (:foreground ,green))))
+     `(neo-file-link-face          ((,c (:foreground ,fg))))
+     `(neo-dir-link-face           ((,c (:foreground ,blue))))
+     `(neo-expand-btn-face         ((,c (:foreground ,blue))))
      ;; pos-tip
      `(popup                       ((,c (:inherit tooltip))))
      `(popup-tip-face              ((,c (:inherit tooltip))))
-     ;; evil-mode
-     `(evil-ex-substitute-replacement ((,c (:foreground ,magenta :background ,black :bold ,bold))))
-     `(evil-search-highlight-persist-highlight-face ((,c (:background ,search-rest-bg))))
-     ;; evil-snipe
-     `(evil-snipe-first-match-face ((,c (:foreground ,search-fg :background ,search-bg))))
-     `(evil-snipe-matches-face     ((,c (:foreground ,search-bg :underline t))))
      ;; Volatile highlights
      `(vhl/default-face            ((,c (:background ,grey-d))))
-     ;; VCS
-     `(diff-hl-change              ((,c (:foreground ,vc-modified))))
-     `(diff-hl-delete              ((,c (:foreground ,vc-deleted))))
-     `(diff-hl-insert              ((,c (:foreground ,vc-added))))
-     `(git-gutter:modified         ((,c (:foreground ,vc-modified))))
-     `(git-gutter:added            ((,c (:foreground ,vc-added))))
-     `(git-gutter:deleted          ((,c (:foreground ,vc-deleted))))
-     `(git-gutter+-modified        ((,c (:foreground ,vc-modified :background nil))))
-     `(git-gutter+-added           ((,c (:foreground ,vc-added :background nil))))
-     `(git-gutter+-deleted         ((,c (:foreground ,vc-deleted :background nil))))
      ;; Rainbow delimiters
      `(rainbow-delimiters-depth-1-face   ((,c (:foreground ,blue))))
      `(rainbow-delimiters-depth-2-face   ((,c (:foreground ,magenta))))
      `(rainbow-delimiters-depth-3-face   ((,c (:foreground ,green))))
      `(rainbow-delimiters-depth-4-face   ((,c (:foreground ,orange))))
-     `(rainbow-delimiters-depth-5-face   ((,c (:foreground ,orange))))
+     `(rainbow-delimiters-depth-5-face   ((,c (:foreground ,violet))))
      `(rainbow-delimiters-unmatched-face ((,c (:foreground ,red :inverse-video t))))
-     ;; Helm
-     `(helm-selection              ((,c (:background ,selection :foreground ,fg))))
-     `(helm-match                  ((,c (:foreground ,magenta :bold t))))
-     `(helm-source-header          ((,c (:background ,current-line :foreground ,grey-l))))
-     `(helm-swoop-target-line-face ((,c (:foreground ,highlight :inverse-video t))))
-     `(helm-ff-file              ((,c (:foreground ,fg))))
-     `(helm-ff-prefix            ((,c (:foreground ,magenta))))
-     `(helm-ff-dotted-directory  ((,c (:foreground ,grey-d))))
-     `(helm-ff-directory         ((,c (:foreground ,orange))))
-     `(helm-ff-executable        ((,c (:foreground ,white :slant italic))))
-     ;; Avy
-     `(avy-lead-face-0    ((,c (:background ,highlight :foreground ,black))))
-     `(avy-lead-face-1    ((,c (:background ,highlight :foreground ,black))))
-     `(avy-lead-face-2    ((,c (:background ,highlight :foreground ,black))))
-     `(avy-lead-face      ((,c (:background ,highlight :foreground ,black))))
+     ;; re-builder
+     `(reb-match-0 ((,c (:foreground ,orange   :inverse-video t))))
+     `(reb-match-1 ((,c (:foreground ,magenta  :inverse-video t))))
+     `(reb-match-2 ((,c (:foreground ,green    :inverse-video t))))
+     `(reb-match-3 ((,c (:foreground ,yellow   :inverse-video t))))
      ;; which-key
      `(which-key-key-face                   ((,c (:foreground ,green))))
      `(which-key-group-description-face     ((,c (:foreground ,violet))))
      `(which-key-command-description-face   ((,c (:foreground ,blue))))
      `(which-key-local-map-description-face ((,c (:foreground ,magenta))))
+     ;; whitespace
+     `(whitespace-tab              ((,c (:foreground ,grey-d))))
+     `(whitespace-newline          ((,c (:foreground ,grey-d))))
+     `(whitespace-trailing         ((,c (:background ,grey-d))))
+     `(whitespace-line             ((,c (:background ,current-line :foreground ,magenta))))
+     ;; workgroups2
+     `(wg-current-workgroup-face   ((,c (:foreground ,black  :background ,blue))))
+     `(wg-other-workgroup-face     ((,c (:foreground ,grey-l :background ,current-line))))
+     `(wg-divider-face             ((,c (:foreground ,grey-d))))
+     `(wg-brace-face               ((,c (:foreground ,blue))))
 
      ;;
      ;; Language-specific

     `(web-mode-html-tag-face          ((,c (:foreground ,methods))))
     `(web-mode-html-tag-bracket-face  ((,c (:foreground ,methods))))
     `(web-mode-html-attr-name-face    ((,c (:foreground ,type))))
     `(web-mode-html-entity-face       ((,c (:foreground ,cyan :italic t))))
     `(web-mode-block-control-face     ((,c (:foreground ,orange))))
     ;;`(web-mode-html-tag-bracket-face  ((,c (:foreground ,operators))))
     ;; markdown-mode
     `(markdown-header-face           ((,c (:foreground ,blue :bold t))))
     `(markdown-header-delimiter-face ((,c (:inherit markdown-header-face))))
     `(markdown-blockquote-face ((,c (:foreground ,violet))))
     `(markdown-markup-face     ((,c (:foreground ,operators))))

                     (doom-name-to-rgb color2))))

(defun doom-darken (color alpha)
  (doom-blend color "#000000" (- 1 alpha)))

(defun doom-lighten (color alpha)
  (doom-blend color "#FFFFFF" (- 1 alpha)))


(when (display-graphic-p)
  (defface doom-default '((t (:inherit default)))
    "Face for source code windows."
    :group 'doom)

  (defface doom-minibuffer-active '((t (:inherit mode-line)))
