aboutsummaryrefslogtreecommitdiffstats
path: root/elpa/doom-themes-20220504.1557/doom-horizon-theme.el
blob: 2ba69f61276dadd16f979ce68c2c7de4bd8024f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
;;; doom-horizon-theme.el --- Inspired by VSCode Horizon -*- lexical-binding: t; no-byte-compile: t; -*-

;;; Commentary:
;;; This theme was inspired by the port of Horizon to Emacs
;;; see: https://github.com/aodhneine/horizon-theme.el

(require 'doom-themes)

;;; Code:
(defgroup doom-horizon-theme nil
  "Options for the `doom-horizon' theme."
  :group 'doom-themes)

(defcustom doom-horizon-brighter-modeline nil
  "If non-nil, more vivid colors will be used to style the mode-line."
  :group 'doom-horizon-theme
  :type 'boolean)

(defcustom doom-horizon-brighter-comments nil
  "If non-nil, comments will be highlighted in more vivid colors."
  :group 'doom-horizon-theme
  :type 'boolean)

(defcustom doom-horizon-comment-bg doom-horizon-brighter-comments
  "If non-nil, comments will have a subtle, darker background. Enhancing their legibility."
  :group 'doom-horizon-theme
  :type 'boolean)

(defcustom doom-horizon-padded-modeline doom-themes-padded-modeline
  "If non-nil, adds a 4px padding to the mode-line. Can be an integer to determine the exact padding."
  :group 'doom-horizon-theme
  :type '(choice integer boolean))

;;
(def-doom-theme doom-horizon
  "A port of the port of the Visual Studio Code theme Horizon"

  ;; name       default    256       16
  ((bg         '("#232530" nil       nil            ))
   (bg-alt     '("#1c1e26" nil       nil            ))
   (base0      '("#16161c" "black"   "black"        ))
   (base1      '("#1a1c23" "#111111" "brightblack"  ))
   (base2      '("#1d1f27" "#333333" "brightblack"  ))
   (base3      '("#232530" "#555555" "white"        ))
   (base4      '("#6a6a6a" "#6a6a6a" "white"        ))
   (base5      '("#f9cec3" "#f9cec3" "white"        ))
   (base6      '("#f9cbbe" "#f9cbbe" "white"        ))
   (base7      '("#fadad1" "#fadad1" "white"        ))
   (base8      '("#fdf0ed" "#fdf0ed" "white"        ))
   (fg-alt     '("#fdf0ed" "#fdf0ed" "brightwhite"  ))
   (fg         '("#c7c9cb" "#c7c9cb" "white"        ))

   (grey       base4)
   (red        '("#e95678" "#e95678" "red"          ))
   (orange     '("#f09383" "#f09383" "brightred"    ))
   (green      '("#09f7a0" "#09f7a0" "green"        ))
   (teal       '("#87ceeb" "#87ceeb" "brightgreen"  ))
   (yellow     '("#fab795" "#fab795" "yellow"       ))
   (blue       '("#21bfc2" "#21bfc2" "brightblue"   ))
   (dark-blue  '("#25b2bc" "#25b2bc" "blue"         ))
   (magenta    '("#6c6f93" "#6c6f93" "magenta"      ))
   (violet     '("#b877db" "#b877db" "brightmagenta"))
   (cyan       '("#59e3e3" "#59e3e3" "brightcyan"   ))
   (dark-cyan  '("#27d797" "#27d797" "cyan"   ))

   ;; additional highlighting colours for horizon
   (hor-highlight  `(,(doom-lighten (car base3) 0.05) ,@(cdr base2)))
   (hor-highlight-selected (doom-lighten base3 0.1))
   (hor-highlight-bright (doom-lighten base3 0.2))
   (hor-highlight-brighter (doom-lighten base3 0.5))

   ;; face categories -- required for all themes
   (highlight      red)
   (vertical-bar   base0)
   (selection      violet)
   (builtin        violet)
   (comments       (if doom-horizon-brighter-comments magenta hor-highlight-bright))
   (doc-comments   yellow)
   (constants      orange)
   (functions      teal)
   (keywords       violet)
   (methods        magenta)
   (operators      teal)
   (type           teal)
   (strings        yellow)
   (variables      red)
   (numbers        orange)
   (region         hor-highlight)
   (error          red)
   (warning        dark-cyan)
   (success        green)
   (vc-modified    orange)
   (vc-added       green)
   (vc-deleted     red)


   ;; custom categories
   (hidden     `(,(car bg) "black" "black"))
   (-modeline-bright doom-horizon-brighter-modeline)
   (-modeline-pad
    (when doom-horizon-padded-modeline
      (if (integerp doom-horizon-padded-modeline) doom-horizon-padded-modeline 4)))

   (modeline-fg     `(,(doom-darken (car fg) 0.2) ,@(cdr fg-alt)))
   (modeline-fg-alt `(,(doom-lighten (car bg) 0.2) ,@(cdr base3)))

   (modeline-bg (if -modeline-bright base4 base1))
   (modeline-bg-inactive base1))


  ;;;; Base theme face overrides
  (((font-lock-comment-face &override)
    :slant 'italic
    :background (if doom-horizon-comment-bg (doom-lighten bg 0.03)))
   (fringe :background bg)
   (link :foreground yellow :inherit 'underline)
   ((line-number &override) :foreground hor-highlight-selected)
   ((line-number-current-line &override) :foreground hor-highlight-brighter)
   (mode-line
    :background modeline-bg :foreground modeline-fg
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
   (mode-line-inactive
    :background modeline-bg-inactive :foreground modeline-fg-alt
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))
   (mode-line-emphasis :foreground (if -modeline-bright base8 highlight))
   (mode-line-highlight :background base1 :foreground fg)
   (tooltip :background base0 :foreground fg)

   ;;;; company
   (company-box-background    :background base0 :foreground fg)
   (company-tooltip-common    :foreground red :weight 'bold)
   (company-tooltip-selection :background hor-highlight :foreground fg)
   ;;;; css-mode <built-in> / scss-mode
   (css-proprietary-property :foreground violet)
   (css-property             :foreground fg)
   (css-selector             :foreground red)
   ;;;; doom-modeline
   (doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
   (doom-modeline-highlight :foreground (doom-lighten bg 0.3))
   (doom-modeline-project-dir :foreground red :inherit 'bold )
   (doom-modeline-buffer-path :foreground red)
   (doom-modeline-buffer-file :foreground fg)
   (doom-modeline-buffer-modified :foreground violet)
   (doom-modeline-panel :background base1)
   (doom-modeline-urgent :foreground modeline-fg)
   (doom-modeline-info :foreground cyan)
   ;;;; elscreen
   (elscreen-tab-other-screen-face :background "#353a42" :foreground "#1e2022")
   ;;;; evil
   (evil-ex-search          :background hor-highlight-selected :foreground fg)
   (evil-ex-lazy-highlight  :background hor-highlight :foreground fg)
   ;;;; haskell-mode
   (haskell-type-face :foreground violet)
   (haskell-constructor-face :foreground yellow)
   (haskell-operator-face :foreground fg)
   (haskell-literate-comment-face :foreground hor-highlight-selected)
   ;;;; ivy
   (ivy-current-match       :background hor-highlight :distant-foreground nil)
   (ivy-posframe-cursor     :background red :foreground base0)
   (ivy-minibuffer-match-face-2 :foreground red :weight 'bold)
   ;;;; js2-mode
   (js2-object-property        :foreground red)
   ;;;; markdown-mode
   (markdown-markup-face           :foreground cyan)
   (markdown-link-face             :foreground orange)
   (markdown-link-title-face       :foreground yellow)
   (markdown-header-face           :foreground red :inherit 'bold)
   (markdown-header-delimiter-face :foreground red :inherit 'bold)
   (markdown-language-keyword-face :foreground orange)
   (markdown-markup-face           :foreground fg)
   (markdown-bold-face             :foreground violet)
   (markdown-table-face            :foreground fg :background base1)
   ((markdown-code-face &override) :foreground orange :background base1)
   ;;;; orderless
   (orderless-match-face-1 :weight 'bold :foreground (doom-blend red fg 0.6) :background (doom-blend red bg 0.1))
   ;;;; mic-paren
   (paren-face-match    :foreground green   :background base0 :weight 'ultra-bold)
   (paren-face-mismatch :foreground yellow :background base0   :weight 'ultra-bold)
   (paren-face-no-match :inherit 'paren-face-mismatch :weight 'ultra-bold)
   ;;;; magit
   (magit-section-heading :foreground red)
   (magit-branch-remote   :foreground orange)
   ;;;; outline <built-in>
   ((outline-1 &override) :foreground blue :background nil)
   ;;;; org <built-in>
   ((org-block &override) :background base1)
   ((org-block-begin-line &override) :background base1 :foreground comments)
   (org-hide :foreground hidden)
   (org-link :inherit 'underline :foreground yellow)
   (org-agenda-done :foreground cyan)
   ;;;; rjsx-mode
   (rjsx-tag :foreground red)
   (rjsx-tag-bracket-face :foreground red)
   (rjsx-attr :foreground cyan :slant 'italic :weight 'medium)
   ;;;; solaire-mode
   (solaire-mode-line-face
    :inherit 'mode-line
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
   (solaire-mode-line-inactive-face
    :inherit 'mode-line-inactive
    :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))
   ;;;; treemacs
   (treemacs-root-face :foreground fg :weight 'bold :height 1.2)
   (doom-themes-treemacs-root-face :foreground fg :weight 'ultra-bold :height 1.2)
   (doom-themes-treemacs-file-face :foreground fg)
   (treemacs-directory-face :foreground fg)
   (treemacs-git-modified-face :foreground green)
   ;;;; web-mode
   (web-mode-html-tag-bracket-face :foreground red)
   (web-mode-html-tag-face         :foreground red)
   (web-mode-html-attr-name-face   :foreground orange)))

;;; doom-horizon-theme.el ends here