<commit_before>;;; color-theme-zenburn.el --- A low contrast color theme.
;;;
;;; Credits:
;;; <NAME> created the original theme for vim on such this port
;;; is based.
;;; Inspired by the emacs theme by <NAME>:
;;; https://github.com/bbatsov/zenburn-emacs

(require 'org)
(require 'init-prefs)

;;; Color palette.
;;; `+N' suffixes indicate a color is lighter.
;;; `-N' suffixes indicate a color is darker.

(defconst zenburn-colors
  '((zenburn-fg+1     . "#FFFFEF")
    (zenburn-fg       . "#DCDCCC")
    (zenburn-fg-1     . "#656555")
    (zenburn-bg-2     . "#000000")
    (zenburn-bg-1     . "#2B2B2B")
    (zenburn-bg-05    . "#383838")
    (zenburn-bg       . "#3F3F3F")
    (zenburn-bg+05    . "#494949")
    (zenburn-bg+1     . "#4F4F4F")
    (zenburn-bg+2     . "#5F5F5F")
    (zenburn-bg+3     . "#6F6F6F")
    (zenburn-red+1    . "#DCA3A3")
    (zenburn-red      . "#CC9393")
    (zenburn-red-1    . "#BC8383")
    (zenburn-red-2    . "#AC7373")
    (zenburn-red-3    . "#9C6363")
    (zenburn-red-4    . "#8C5353")
    (zenburn-orange   . "#DFAF8F")
    (zenburn-yellow   . "#F0DFAF")
    (zenburn-yellow-1 . "#E0CF9F")
    (zenburn-yellow-2 . "#D0BF8F")
    (zenburn-green-1  . "#5F7F5F")
    (zenburn-green    . "#7F9F7F")
    (zenburn-green+1  . "#8FB28F")
    (zenburn-green+2  . "#9FC59F")
    (zenburn-green+3  . "#AFD8AF")
    (zenburn-green+4  . "#BFEBBF")
    (zenburn-cyan     . "#93E0E3")
    (zenburn-blue+1   . "#94BFF3")
    (zenburn-blue     . "#8CD0D3")
    (zenburn-blue-1   . "#7CB8BB")
    (zenburn-blue-2   . "#6CA0A3")
    (zenburn-blue-3   . "#5C888B")
    (zenburn-blue-4   . "#4C7073")
    (zenburn-blue-5   . "#366060")
    (zenburn-magenta  . "#DC8CC3")))

;;; Theme definition

(defmacro with-zenburn-colors (&rest body)
  "Execute `BODY' in a scope with variables bound to the zenburn colors."
  `(let ((class '((class color) (min-colors 89)))
         ,@(mapcar (lambda (cons)
                     (list (car cons) (cdr cons)))
                   zenburn-colors))
     ,@body))

(defmacro zenburn-face-specs ()
  "Return a backquote which defines a list of face specs.
It expects to be evaluated in a scope in which the various color
names to which it refers are bound."
  (quote
   `(;; basic coloring
     (button ((t (:underline t))))
     (link ((t (:foreground ,zenburn-yellow :underline t :weight bold))))
     (link-visited ((t (:foreground ,zenburn-yellow-2 :underline t :weight normal))))
     (default ((t (:foreground ,zenburn-fg :background ,zenburn-bg))))
     (cursor ((t (:foreground ,zenburn-fg :background ,zenburn-fg+1))))
     (escape-glyph ((t (:foreground ,zenburn-yellow :bold t))))
     (fringe ((t (:foreground ,zenburn-fg :background ,zenburn-bg+1))))
     (header-line ((t (:foreground ,zenburn-yellow :background ,zenburn-bg-1
                            :box (:line-width -1 :style released-button)))))
     (highlight ((t (:background ,zenburn-bg-05))))
     (success ((t (:foreground ,zenburn-green :weight bold))))
     (warning ((t (:foreground ,zenburn-orange :weight bold))))
     (shadow ((t (:background ,zenburn-bg+1))))

     ;; compilation
     (compilation-column-face ((t (:foreground ,zenburn-yellow))))
     (compilation-enter-directory-face ((t (:foreground ,zenburn-green))))
     (compilation-error-face ((t (:foreground ,zenburn-red-1 :weight bold :underline t))))
     (compilation-face ((t (:foreground ,zenburn-fg))))
     (compilation-info-face ((t (:foreground ,zenburn-blue))))
     (compilation-info ((t (:foreground ,zenburn-green+4 :underline t))))
     (compilation-leave-directory-face ((t (:foreground ,zenburn-green))))
     (compilation-line-face ((t (:foreground ,zenburn-yellow))))
     (compilation-line-number ((t (:foreground ,zenburn-yellow))))
     (compilation-message-face ((t (:foreground ,zenburn-blue))))
     (compilation-warning-face ((t (:foreground ,zenburn-orange :weight bold :underline t))))
     (compilation-mode-line-exit ((t (:foreground ,zenburn-green+2 :weight bold))))
     (compilation-mode-line-fail ((t (:foreground ,zenburn-red :weight bold))))
     (compilation-mode-line-run ((t (:foreground ,zenburn-yellow :weight bold))))

     ;; completions
     (completions-annotations ((t (:foreground ,zenburn-fg-1))))

     ;; grep
     (grep-context-face ((t (:foreground ,zenburn-fg))))
     (grep-error-face ((t (:foreground ,zenburn-red-1 :weight bold :underline t))))
     (grep-hit-face ((t (:foreground ,zenburn-blue))))
     (grep-match-face ((t (:foreground ,zenburn-orange :weight bold))))
     (match ((t (:background ,zenburn-bg-1 :foreground ,zenburn-orange :weight bold))))

     ;; isearch
     (isearch ((t (:foreground ,zenburn-yellow-2 :weight bold :background ,zenburn-bg+2))))
     (isearch-fail ((t (:foreground ,zenburn-fg :background ,zenburn-red-4))))
     (lazy-highlight ((t (:foreground ,zenburn-yellow-2 :weight bold :background ,zenburn-bg-05))))

     ;; Hi-Lock
     (hi-yellow ((t (:foreground ,zenburn-yellow-2 :background ,zenburn-bg :inverse-video t))))
     (hi-pink ((t (:foreground ,zenburn-magenta :background ,zenburn-bg :inverse-video t))))
     (hi-green ((t (:foreground ,zenburn-green :background ,zenburn-bg :inverse-video t))))
     (hi-blue ((t (:foreground ,zenburn-cyan :background ,zenburn-bg :inverse-video t))))

     ;; UI
     (menu ((t (:foreground ,zenburn-fg :background ,zenburn-bg))))
     (minibuffer-prompt ((t (:foreground ,zenburn-yellow))))
     (mode-line
      ((,class (:foreground ,zenburn-green+1 :background ,zenburn-bg-1
                :box (:line-width -1 :style released-button)))
       (t :inverse-video t)))
     (mode-line-buffer-id ((t (:foreground ,zenburn-yellow :weight bold))))
     (mode-line-inactive
      ((t (:foreground ,zenburn-green-1 :background ,zenburn-bg-1 ; for powerline (previously zenburn-bg-05)
                            :box (:line-width -1 :style released-button)))))
     (region ((,class (:background ,zenburn-bg-1))
              (t :inverse-video t)))
     (secondary-selection ((t (:background ,zenburn-bg+2))))
     (trailing-whitespace ((t (:background ,zenburn-red))))
     (vertical-border ((t (:foreground ,zenburn-fg))))

     ;; font lock
     (font-lock-builtin-face ((t (:foreground ,zenburn-fg :weight bold))))
     (font-lock-comment-face ((t (:foreground ,zenburn-green :italic nil))))
     (font-lock-comment-delimiter-face ((t (:foreground ,zenburn-green-1))))
     (font-lock-constant-face ((t (:foreground ,zenburn-green+4))))
     (font-lock-doc-face ((t (:foreground ,zenburn-green+2))))
     (font-lock-function-name-face ((t (:foreground ,zenburn-cyan))))
     (font-lock-keyword-face ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-negation-char-face ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-preprocessor-face ((t (:foreground ,zenburn-blue+1))))
     (font-lock-regexp-grouping-construct ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-regexp-grouping-backslash ((t (:foreground ,zenburn-green :weight bold))))
     (font-lock-string-face ((t (:foreground ,zenburn-red))))
     (font-lock-type-face ((t (:foreground ,zenburn-blue-1))))
     (font-lock-variable-name-face ((t (:foreground ,zenburn-orange))))
     (font-lock-warning-face ((t (:foreground ,zenburn-yellow-2 :weight bold))))

     (c-annotation-face ((t (:inherit font-lock-constant-face))))

     ;; Powerline
     (exordium-powerline-active1 ((t (:background ,zenburn-bg-1))))
     (exordium-powerline-active2 ((t (:background ,zenburn-bg-05))))
     (exordium-powerline-active3 ((t (:background ,zenburn-yellow :foreground ,zenburn-bg))))
     (exordium-powerline-active4 ((t (:background ,zenburn-red :foreground ,zenburn-bg))))
     (exordium-powerline-active5 ((t (:background ,zenburn-green :foreground ,zenburn-bg))))
     (exordium-powerline-inactive1 ((t (:background ,zenburn-bg-1))))
     (exordium-powerline-inactive2 ((t (:background ,zenburn-bg-05))))
     (exordium-powerline-inactive3 ((t (:background ,zenburn-bg :foreground ,zenburn-yellow))))
     (exordium-project-name ((t (:foreground ,zenburn-yellow))))

     (powerline-active1 ((t (:background ,zenburn-bg-05 :inherit mode-line))))
     (powerline-active2 ((t (:background ,zenburn-bg+2 :inherit mode-line))))
     (powerline-inactive1 ((t (:background ,zenburn-bg+1 :inherit mode-line-inactive))))
     (powerline-inactive2 ((t (:background ,zenburn-bg+3 :inherit mode-line-inactive))))

     ;; auctex
     (font-latex-bold-face ((t (:inherit bold))))
     (font-latex-warning-face ((t (:foreground nil :inherit font-lock-warning-face))))
     (font-latex-sectioning-5-face ((t (:foreground ,zenburn-red :weight bold ))))
     (font-latex-sedate-face ((t (:foreground ,zenburn-yellow))))
     (font-latex-italic-face ((t (:foreground ,zenburn-cyan :slant italic))))
     (font-latex-string-face ((t (:inherit ,font-lock-string-face))))
     (font-latex-math-face ((t (:foreground ,zenburn-orange))))

     ;; auto-complete
     (ac-candidate-face ((t (:background ,zenburn-bg+3 :foreground ,zenburn-bg-2))))
     (ac-selection-face ((t (:background ,zenburn-blue-4 :foreground ,zenburn-fg))))
     (popup-tip-face ((t (:background ,zenburn-yellow-2 :foreground ,zenburn-bg-2))))
     (popup-scroll-bar-foreground-face ((t (:background ,zenburn-blue-5))))
     (popup-scroll-bar-background-face ((t (:background ,zenburn-bg-1))))
     (popup-isearch-match ((t (:background ,zenburn-bg :foreground ,zenburn-fg))))

     ;; diff<commit_msg>Update zenburn color theme for company mode<commit_after>;;; color-theme-zenburn.el --- A low contrast color theme.
;;;
;;; Credits:
;;; <NAME> created the original theme for vim on such this port
;;; is based.
;;; Inspired by the emacs theme by <NAME>:
;;; https://github.com/bbatsov/zenburn-emacs

(require 'org)
(require 'init-prefs)

;;; Color palette.
;;; `+N' suffixes indicate a color is lighter.
;;; `-N' suffixes indicate a color is darker.

(defconst zenburn-colors
  '((zenburn-fg+1     . "#FFFFEF")
    (zenburn-fg       . "#DCDCCC")
    (zenburn-fg-1     . "#656555")
    (zenburn-bg-2     . "#000000")
    (zenburn-bg-1     . "#2B2B2B")
    (zenburn-bg-05    . "#383838")
    (zenburn-bg       . "#3F3F3F")
    (zenburn-bg+05    . "#494949")
    (zenburn-bg+1     . "#4F4F4F")
    (zenburn-bg+2     . "#5F5F5F")
    (zenburn-bg+3     . "#6F6F6F")
    (zenburn-red+1    . "#DCA3A3")
    (zenburn-red      . "#CC9393")
    (zenburn-red-1    . "#BC8383")
    (zenburn-red-2    . "#AC7373")
    (zenburn-red-3    . "#9C6363")
    (zenburn-red-4    . "#8C5353")
    (zenburn-orange   . "#DFAF8F")
    (zenburn-yellow   . "#F0DFAF")
    (zenburn-yellow-1 . "#E0CF9F")
    (zenburn-yellow-2 . "#D0BF8F")
    (zenburn-green-1  . "#5F7F5F")
    (zenburn-green    . "#7F9F7F")
    (zenburn-green+1  . "#8FB28F")
    (zenburn-green+2  . "#9FC59F")
    (zenburn-green+3  . "#AFD8AF")
    (zenburn-green+4  . "#BFEBBF")
    (zenburn-cyan     . "#93E0E3")
    (zenburn-blue+1   . "#94BFF3")
    (zenburn-blue     . "#8CD0D3")
    (zenburn-blue-1   . "#7CB8BB")
    (zenburn-blue-2   . "#6CA0A3")
    (zenburn-blue-3   . "#5C888B")
    (zenburn-blue-4   . "#4C7073")
    (zenburn-blue-5   . "#366060")
    (zenburn-magenta  . "#DC8CC3")))

;;; Theme definition

(defmacro with-zenburn-colors (&rest body)
  "Execute `BODY' in a scope with variables bound to the zenburn colors."
  `(let ((class '((class color) (min-colors 89)))
         ,@(mapcar (lambda (cons)
                     (list (car cons) (cdr cons)))
                   zenburn-colors))
     ,@body))

(defmacro zenburn-face-specs ()
  "Return a backquote which defines a list of face specs.
It expects to be evaluated in a scope in which the various color
names to which it refers are bound."
  (quote
   `(;; basic coloring
     (button ((t (:underline t))))
     (link ((t (:foreground ,zenburn-yellow :underline t :weight bold))))
     (link-visited ((t (:foreground ,zenburn-yellow-2 :underline t :weight normal))))
     (default ((t (:foreground ,zenburn-fg :background ,zenburn-bg))))
     (cursor ((t (:foreground ,zenburn-fg :background ,zenburn-fg+1))))
     (escape-glyph ((t (:foreground ,zenburn-yellow :bold t))))
     (fringe ((t (:foreground ,zenburn-fg :background ,zenburn-bg+1))))
     (header-line ((t (:foreground ,zenburn-yellow :background ,zenburn-bg-1
                            :box (:line-width -1 :style released-button)))))
     (highlight ((t (:background ,zenburn-bg-05))))
     (success ((t (:foreground ,zenburn-green :weight bold))))
     (warning ((t (:foreground ,zenburn-orange :weight bold))))
     (shadow ((t (:background ,zenburn-bg+1))))

     ;; compilation
     (compilation-column-face ((t (:foreground ,zenburn-yellow))))
     (compilation-enter-directory-face ((t (:foreground ,zenburn-green))))
     (compilation-error-face ((t (:foreground ,zenburn-red-1 :weight bold :underline t))))
     (compilation-face ((t (:foreground ,zenburn-fg))))
     (compilation-info-face ((t (:foreground ,zenburn-blue))))
     (compilation-info ((t (:foreground ,zenburn-green+4 :underline t))))
     (compilation-leave-directory-face ((t (:foreground ,zenburn-green))))
     (compilation-line-face ((t (:foreground ,zenburn-yellow))))
     (compilation-line-number ((t (:foreground ,zenburn-yellow))))
     (compilation-message-face ((t (:foreground ,zenburn-blue))))
     (compilation-warning-face ((t (:foreground ,zenburn-orange :weight bold :underline t))))
     (compilation-mode-line-exit ((t (:foreground ,zenburn-green+2 :weight bold))))
     (compilation-mode-line-fail ((t (:foreground ,zenburn-red :weight bold))))
     (compilation-mode-line-run ((t (:foreground ,zenburn-yellow :weight bold))))

     ;; completions
     (completions-annotations ((t (:foreground ,zenburn-fg-1))))

     ;; grep
     (grep-context-face ((t (:foreground ,zenburn-fg))))
     (grep-error-face ((t (:foreground ,zenburn-red-1 :weight bold :underline t))))
     (grep-hit-face ((t (:foreground ,zenburn-blue))))
     (grep-match-face ((t (:foreground ,zenburn-orange :weight bold))))
     (match ((t (:background ,zenburn-bg-1 :foreground ,zenburn-orange :weight bold))))

     ;; isearch
     (isearch ((t (:foreground ,zenburn-yellow-2 :weight bold :background ,zenburn-bg+2))))
     (isearch-fail ((t (:foreground ,zenburn-fg :background ,zenburn-red-4))))
     (lazy-highlight ((t (:foreground ,zenburn-yellow-2 :weight bold :background ,zenburn-bg-05))))

     ;; Hi-Lock
     (hi-yellow ((t (:foreground ,zenburn-yellow-2 :background ,zenburn-bg :inverse-video t))))
     (hi-pink ((t (:foreground ,zenburn-magenta :background ,zenburn-bg :inverse-video t))))
     (hi-green ((t (:foreground ,zenburn-green :background ,zenburn-bg :inverse-video t))))
     (hi-blue ((t (:foreground ,zenburn-cyan :background ,zenburn-bg :inverse-video t))))

     ;; UI
     (menu ((t (:foreground ,zenburn-fg :background ,zenburn-bg))))
     (minibuffer-prompt ((t (:foreground ,zenburn-yellow))))
     (mode-line
      ((,class (:foreground ,zenburn-green+1 :background ,zenburn-bg-1
                :box (:line-width -1 :style released-button)))
       (t :inverse-video t)))
     (mode-line-buffer-id ((t (:foreground ,zenburn-yellow :weight bold))))
     (mode-line-inactive
      ((t (:foreground ,zenburn-green-1 :background ,zenburn-bg-1 ; for powerline (previously zenburn-bg-05)
                            :box (:line-width -1 :style released-button)))))
     (region ((,class (:background ,zenburn-bg-1))
              (t :inverse-video t)))
     (secondary-selection ((t (:background ,zenburn-bg+2))))
     (trailing-whitespace ((t (:background ,zenburn-red))))
     (vertical-border ((t (:foreground ,zenburn-fg))))

     ;; font lock
     (font-lock-builtin-face ((t (:foreground ,zenburn-fg :weight bold))))
     (font-lock-comment-face ((t (:foreground ,zenburn-green :italic nil))))
     (font-lock-comment-delimiter-face ((t (:foreground ,zenburn-green-1))))
     (font-lock-constant-face ((t (:foreground ,zenburn-green+4))))
     (font-lock-doc-face ((t (:foreground ,zenburn-green+2))))
     (font-lock-function-name-face ((t (:foreground ,zenburn-cyan))))
     (font-lock-keyword-face ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-negation-char-face ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-preprocessor-face ((t (:foreground ,zenburn-blue+1))))
     (font-lock-regexp-grouping-construct ((t (:foreground ,zenburn-yellow :weight bold))))
     (font-lock-regexp-grouping-backslash ((t (:foreground ,zenburn-green :weight bold))))
     (font-lock-string-face ((t (:foreground ,zenburn-red))))
     (font-lock-type-face ((t (:foreground ,zenburn-blue-1))))
     (font-lock-variable-name-face ((t (:foreground ,zenburn-orange))))
     (font-lock-warning-face ((t (:foreground ,zenburn-yellow-2 :weight bold))))

     (c-annotation-face ((t (:inherit font-lock-constant-face))))

     ;; Powerline
     (exordium-powerline-active1 ((t (:background ,zenburn-bg-1))))
     (exordium-powerline-active2 ((t (:background ,zenburn-bg-05))))
     (exordium-powerline-active3 ((t (:background ,zenburn-yellow :foreground ,zenburn-bg))))
     (exordium-powerline-active4 ((t (:background ,zenburn-red :foreground ,zenburn-bg))))
     (exordium-powerline-active5 ((t (:background ,zenburn-green :foreground ,zenburn-bg))))
     (exordium-powerline-inactive1 ((t (:background ,zenburn-bg-1))))
     (exordium-powerline-inactive2 ((t (:background ,zenburn-bg-05))))
     (exordium-powerline-inactive3 ((t (:background ,zenburn-bg :foreground ,zenburn-yellow))))
     (exordium-project-name ((t (:foreground ,zenburn-yellow))))

     (powerline-active1 ((t (:background ,zenburn-bg-05 :inherit mode-line))))
     (powerline-active2 ((t (:background ,zenburn-bg+2 :inherit mode-line))))
     (powerline-inactive1 ((t (:background ,zenburn-bg+1 :inherit mode-line-inactive))))
     (powerline-inactive2 ((t (:background ,zenburn-bg+3 :inherit mode-line-inactive))))

     ;; auctex
     (font-latex-bold-face ((t (:inherit bold))))
     (font-latex-warning-face ((t (:foreground nil :inherit font-lock-warning-face))))
     (font-latex-sectioning-5-face ((t (:foreground ,zenburn-red :weight bold ))))
     (font-latex-sedate-face ((t (:foreground ,zenburn-yellow))))
     (font-latex-italic-face ((t (:foreground ,zenburn-cyan :slant italic))))
     (font-latex-string-face ((t (:inherit ,font-lock-string-face))))
     (font-latex-math-face ((t (:foreground ,zenburn-orange))))

     ;; auto-complete
     (ac-candidate-face ((t (:background ,zenburn-bg+3 :foreground ,zenburn-bg-2))))
     (ac-selection-face ((t (:background ,zenburn-blue-4 :foreground ,zenburn-fg))))
     (popup-tip-face ((t (:background ,zenburn-yellow-2 :foreground ,zenburn-bg-2))))
     (popup-scroll-bar-foreground-face ((t (:background ,zenburn-blue-5))))
     (popup-scroll-bar-background-face ((t (:background ,zenburn-bg-1))))
     (popup-isearch-match ((t (:background ,zenburn-bg :foreground ,zenburn-fg))))

     ;; company
     (company-tooltip-common ((t (:background ,zenburn-bg+3 :foreground ,zenburn-bg-2))))
     (company-tooltip-selection ((t (:background ,zenburn-blue-4 :foreground ,zenburn-fg))))
     (company-tooltip ((t (:background ,zenburn-yellow-2 :foreground ,zenburn-bg-2))))
     (company-scrollbar-fg ((t (:background ,zenburn-blue-5))))
     (company-scrollbar-bg ((t (:background ,zenburn-bg-1))))
     (company-tooltip-common-selection ((t (:background ,zenburn-bg :foreground ,zenburn-fg))))

     ;; diff
{'fraction_non_alphanumeric': 0.18982547725062696, 'fraction_numerical': 0.022160806591944318, 'mean_word_length': 3.3919982018431107, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1529577', 'n_tokens_mistral': 7088, 'n_tokens_neox': 6640, 'n_words': 1468}