Skip to content

Commit ebdaa40

Browse files
committed
Colorize operators when using dark background.
1 parent 805ca78 commit ebdaa40

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

elixir-mode.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,12 @@
212212
(defvar elixir-key-label-offset 0)
213213
(defvar elixir-match-label-offset 2)
214214

215-
(defvar font-lock-operator-face 'font-lock-operator-face)
216-
(defface font-lock-operator-face
217-
'((((type tty) (class color)) nil)
218-
(((class color) (background light))
219-
(:foreground "darkred"))
215+
(defvar elixir-operator-face 'elixir-operator-face)
216+
(defface elixir-operator-face
217+
'((((class color) (min-colors 88) (background light))
218+
:foreground "darkred")
219+
(((class color) (background dark))
220+
(:foreground "lemonchiffon1"))
220221
(t nil))
221222
"For use with operators."
222223
:group 'font-lock-faces)
@@ -361,7 +362,7 @@
361362

362363
;; Operators
363364
(,(elixir-rx (group operators))
364-
1 font-lock-operator-face)
365+
1 elixir-operator-face)
365366

366367
;; Atoms and singleton-like words like true/false/nil.
367368
(,(elixir-rx (group (or atoms bool-and-nil)))

0 commit comments

Comments
 (0)