dot-emacs

My emacs dotfiles/config
git clone git://git.ethandl.dev/dot-emacs
Log | Files | Refs

commit a3c3c0e2e699c92e5ab9e22572f11bb0af6ae85c
Author: Ethan Long <Ethan.Long@anu.edu.au>
Date:   Sun, 21 May 2023 01:11:19 +1000

Added my init.el and the catpuccin theme.
I think I'll make the config literate and probably build it into the
readme or something.

Diffstat:
Ainit.el | 316+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/catppuccin-theme.el | 1102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1418 insertions(+), 0 deletions(-)

diff --git a/init.el b/init.el @@ -0,0 +1,316 @@ +;; Elpa & Melpa: +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) + + +;; This is only needed once, near the top of the file +(eval-when-compile + ;; Following line is not needed if use-package.el is in ~/.emacs.d + (add-to-list 'load-path "~/.emacs.d/elpa/use-package-2.4.5") + (require 'use-package)) + +;; Catppuccin Mocha theme +(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") +(load-theme 'catppuccin t) +(setq catppuccin-flavor 'mocha) +(catppuccin-reload) + + +;; Get rid of default crud +(setq inhibit-startup-screen t) +(menu-bar-mode 0) ; This removes the menu bar, if in doubt, keep on. +(tool-bar-mode 0) +(scroll-bar-mode 0) +;; Modeline line and col number +(line-number-mode 1) +(column-number-mode 1) + +;; SILENCE +(setq ring-bell-function 'ignore) + + +;; ivy mode instead of ido mode: +(use-package ivy + :ensure t) +(ivy-mode t) +;; counsel extends ivy: +(use-package counsel + :ensure t) +(counsel-mode t) + + +;; Set the fonts +(defun custom-set-fonts (&optional frame) + (with-selected-frame (or frame (selected-frame)) + ;;(set-face-attribute 'default nil :font "Comic Code Ligatures-16") + (set-face-attribute 'default nil :font "Victor Mono-16") + (set-face-attribute 'font-lock-comment-face nil :slant 'italic) + (set-face-attribute 'font-lock-keyword-face nil :slant 'italic))) +(custom-set-fonts) +(add-hook 'after-make-frame-functions 'custom-set-fonts) + +;; Font ligatures: +(use-package ligature + :ensure t + :config + (ligature-set-ligatures 'prog-mode '(("-" (rx (+ "-"))) + ("-" (rx (* "-") ">")) + ("+" (rx (+ "+"))) + ("<" (rx (+ "="))) + ("<" (rx (+ "=") ">")) + ("<" (rx (+ "~"))) + ("<" (rx (+ "~") ">")) + ("<" (rx "!" (+ "-"))) + ("<" (rx (+ "-"))) + ("<" (rx (+ "-") ">")) + ("<" (rx "|")) + (">" (rx (+ "="))) + (">" (rx ">" (+ "="))) + (">" (rx ">" (+ "=") ">")) + (">" (rx (+ "-"))) + (">" (rx (+ "-") "<")) + ("~" (rx (+ "~"))) + ("~" (rx (+ "~") ">")) + ("=" (rx (* "=") ">")) + ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "=")))) + "!=" + "!==" + "[|" + "|]" + "{|" + "|}" + "|>" + "||" + "&&" + )) + (global-ligature-mode t)) + +;; Rainbow delimiters: +(use-package rainbow-delimiters + :ensure t + :hook (prog-mode . rainbow-delimiters-mode)) + +;; OLD Doom modeline icons +;; Icons for the modeline (and other things probably) +;;(use-package all-the-icons +;; :ensure t) + +;; Doom modeline: +(use-package doom-modeline + :ensure t + :hook (after-init . doom-modeline-mode)) +;; Tweak these when bored or if pissed off at the modeline +;;(setq all-the-icons-scale-factor 1.2) +(setq doom-modeline-height 41) ;; The default (40) causes it to change size with saving >:( + + +;; Which key (this is the thing responsible for coming up with the minibuffer of keys that you can pick): +(use-package which-key + :ensure t + :init (which-key-mode) + :diminish which-key-mode + :config + (setq which-key-idle-delay 0.3)) + +;; Evil mode :D +(use-package evil + :ensure t + :init + (setq evil-want-integration t) + (setq evil-want-keybinding nil) + (setq evil-want-C-d-scroll t) + (setq evil-want-C-u-scroll t) + (setq evil-want-C-i-jump nil) + :config + (evil-mode 1) + ;; Enabling C-g to exit from normal mode, and C-h to do what it normally does in emacs + (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state) + (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join) + + ;; Use visual line motions outside of visual-line-mode buffers + (evil-global-set-key 'motion "j" 'evil-next-visual-line) + (evil-global-set-key 'motion "k" 'evil-previous-visual-line) + + ;; Set initial states to be in normal mode for some buffers + (evil-set-initial-state 'messages-buffer-mode 'normal) + (evil-set-initial-state 'dashboard-mode 'normal) + (setq evil-undo-system 'undo-redo)) + +;; Extra modes for evil, if evil is playing up this would be the first thing to check +(use-package evil-collection + :ensure t + :after evil + :config + (evil-collection-init)) + + +;; Completion & Modernisation +(use-package corfu + :ensure t + :custom + (corfu-cycle t) + (corfu-auto t) + (corfu-scroll-margin 5) + :init + (global-corfu-mode)) + +;; Some more useful configs +(use-package emacs + :init + ;; TAB cycle if there are only a few candidates + (setq completion-cycle-threshold 3)) + + +;; Change the default scroll behaviour to smooth scroll +(pixel-scroll-precision-mode t) +;; Scrolling down a file only goes down a single line when reaching the bottom +(setq scroll-step 1) +;; The region that the curser needs to enter to trigger scrolling +(setq scroll-margin 5) +;; Necessary to stop random jumps +(setq scroll-conservatively 10000) +;; Faster scrolling: +(use-package fast-scroll + :ensure t + :config + (fast-scroll-config) + (fast-scroll-mode 1)) + + +;; Set the backup/autorecover dir to not be in the local directory of the file +(setq backup-directory-alist '(("." . "~/.emacs.d/backups")) + backup-by-copying t ; Don't delink hardlinks + version-control t ; Use version numbers on backups + delete-old-versions t ; Automatically delete excess backups + kept-new-versions 20 ; Number of new versions to keep + kept-old-versions 5 ; Number of old versions to keep + ) + + +;; LSP mode +(use-package lsp + :ensure lsp-mode + :init + (setq gc-cons-threshold 100000000) + (setq read-process-output-max (* 1024 1024))) + + +;; Haskell setup +(use-package haskell-mode + :ensure t) +(use-package lsp-haskell + :ensure t + :config + (add-hook 'haskell-mode-hook #'lsp) + (add-hook 'haskell-literate-mode-hook #'lsp)) + + +;; Rust setup +(use-package rust-mode + :ensure t + :config + (add-hook 'rust-mode-hook #'lsp)) + + +;; Java setup +(use-package lsp-java + :ensure t + :config + (add-hook 'java-mode-hook #'lsp)) + + +;; Emacs crap that it does automatically: +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(connection-local-criteria-alist + '(((:application tramp :protocol "flatpak") + tramp-container-connection-local-default-flatpak-profile) + ((:application tramp) + tramp-connection-local-default-system-profile tramp-connection-local-default-shell-profile))) + '(connection-local-profile-alist + '((tramp-container-connection-local-default-flatpak-profile + (tramp-remote-path "/app/bin" tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin" "/opt/sbin" "/opt/local/bin")) + (tramp-connection-local-darwin-ps-profile + (tramp-process-attributes-ps-args "-acxww" "-o" "pid,uid,user,gid,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state=abcde" "-o" "ppid,pgid,sess,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etime,pcpu,pmem,args") + (tramp-process-attributes-ps-format + (pid . number) + (euid . number) + (user . string) + (egid . number) + (comm . 52) + (state . 5) + (ppid . number) + (pgrp . number) + (sess . number) + (ttname . string) + (tpgid . number) + (minflt . number) + (majflt . number) + (time . tramp-ps-time) + (pri . number) + (nice . number) + (vsize . number) + (rss . number) + (etime . tramp-ps-time) + (pcpu . number) + (pmem . number) + (args))) + (tramp-connection-local-busybox-ps-profile + (tramp-process-attributes-ps-args "-o" "pid,user,group,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "stat=abcde" "-o" "ppid,pgid,tty,time,nice,etime,args") + (tramp-process-attributes-ps-format + (pid . number) + (user . string) + (group . string) + (comm . 52) + (state . 5) + (ppid . number) + (pgrp . number) + (ttname . string) + (time . tramp-ps-time) + (nice . number) + (etime . tramp-ps-time) + (args))) + (tramp-connection-local-bsd-ps-profile + (tramp-process-attributes-ps-args "-acxww" "-o" "pid,euid,user,egid,egroup,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state,ppid,pgid,sid,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etimes,pcpu,pmem,args") + (tramp-process-attributes-ps-format + (pid . number) + (euid . number) + (user . string) + (egid . number) + (group . string) + (comm . 52) + (state . string) + (ppid . number) + (pgrp . number) + (sess . number) + (ttname . string) + (tpgid . number) + (minflt . number) + (majflt . number) + (time . tramp-ps-time) + (pri . number) + (nice . number) + (vsize . number) + (rss . number) + (etime . number) + (pcpu . number) + (pmem . number) + (args))) + (tramp-connection-local-default-shell-profile + (shell-file-name . "/bin/sh") + (shell-command-switch . "-c")) + (tramp-connection-local-default-system-profile + (path-separator . ":") + (null-device . "/dev/null")))) + '(package-selected-packages + '(lsp corfu lsp-java which-key use-package rust-mode rainbow-delimiters lsp-haskell ligature evil-collection doom-modeline counsel fast-scroll))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/themes/catppuccin-theme.el b/themes/catppuccin-theme.el @@ -0,0 +1,1102 @@ +;;; catppuccin-theme.el --- Catppuccin for Emacs - 🍄 Soothing pastel theme for Emacs -*- lexical-binding: t; no-byte-compile: 0; -*- + +;; Copyright 2022-present, All rights reserved +;; +;; Code licensed under the MIT license + +;; Maintainer: Carsten Kragelund <carsten@kragelund.me> +;; Author: nyxkrage +;; Original-Author: film42 +;; Version: 1.0.0 +;; Package-Requires: ((emacs "25.1")) +;; URL: https://github.com/catppuccin/emacs + +;;; Commentary: + +;; 🍄 Soothing pastel theme for Emacs + +;;; Code: +(deftheme catppuccin) + +;;;; Configuration options: + +(defgroup catppuccin nil + "Catppuccin theme options. + +The theme has to be reloaded after changing anything in this group." + :group 'faces) + +(defcustom catppuccin-enlarge-headings t + "Use different font sizes for some headings and titles." + :type 'boolean + :group 'catppuccin) + +(defcustom catppuccin-height-title-1 1.3 + "Header 1 font size." + :type 'number + :group 'catppuccin) + +(defcustom catppuccin-height-title-2 1.2 + "Header 2 font size." + :type 'number + :group 'catppuccin) + +(defcustom catppuccin-height-title-3 1.2 + "Header 3 font size." + :type 'number + :group 'catppuccin) + +(defcustom catppuccin-height-doc-title 1.44 + "Documentation Title font size." + :type 'number + :group 'catppuccin) + +(defcustom catppuccin-flavor 'mocha + "The flavor to use for the Catppuccin theme. +Must be one of `mocha`, `macchiato`, `frappe`, or `latte`." + :type '(choice (const :tag "Mocha" mocha) + (const :tag "Macchiato" macchiato) + (const :tag "Frappe" frappe) + (const :tag "Latte" latte)) + :group 'catppuccin) + +(defcustom catppuccin-mocha-colors '((rosewater . "#f5e0dc") + (flamingo . "#f2cdcd") + (pink . "#f5c2e7") + (mauve . "#cba6f7") + (red . "#f38ba8") + (maroon . "#eba0ac") + (peach . "#fab387") + (yellow . "#f9e2af") + (green . "#a6e3a1") + (teal . "#94e2d5") + (sky . "#89dceb") + (sapphire . "#74c7ec") + (blue . "#89b4fa") + (lavender . "#b4befe") + (text . "#cdd6f4") + (subtext1 . "#bac2de") + (subtext0 . "#a6adc8") + (overlay2 . "#9399b2") + (overlay1 . "#7f849c") + (overlay0 . "#6c7086") + (surface2 . "#585b70") + (surface1 . "#45475a") + (surface0 . "#313244") + (base . "#1e1e2e") + (mantle . "#181825") + (crust . "#11111b")) + "Colors used for catppuccin-mocha." + :tag "Mocha Colors" + :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust) + :type '(alist :key-type symbol :value-type string) + :group 'catppuccin) + +(defcustom catppuccin-macchiato-colors '((rosewater . "#f4dbd6") + (flamingo . "#f0c6c6") + (pink . "#f5bde6") + (mauve . "#c6a0f6") + (red . "#ed8796") + (maroon . "#ee99a0") + (peach . "#f5a97f") + (yellow . "#eed49f") + (green . "#a6da95") + (teal . "#8bd5ca") + (sky . "#91d7e3") + (sapphire . "#7dc4e4") + (blue . "#8aadf4") + (lavender . "#b7bdf8") + (text . "#cad3f5") + (subtext1 . "#b8c0e0") + (subtext0 . "#a5adcb") + (overlay2 . "#939ab7") + (overlay1 . "#8087a2") + (overlay0 . "#6e738d") + (surface2 . "#5b6078") + (surface1 . "#494d64") + (surface0 . "#363a4f") + (base . "#24273a") + (mantle . "#1e2030") + (crust . "#181926")) + "Colors used for catppuccin-macchiato." + :tag "Macchiato Colors" + :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust) + :type '(alist :key-type symbol :value-type string) + :group 'catppuccin) + +(defcustom catppuccin-frappe-colors '((rosewater . "#f2d5cf") + (flamingo . "#eebebe") + (pink . "#f4b8e4") + (mauve . "#ca9ee6") + (red . "#e78284") + (maroon . "#ea999c") + (peach . "#ef9f76") + (yellow . "#e5c890") + (green . "#a6d189") + (teal . "#81c8be") + (sky . "#99d1db") + (sapphire . "#85c1dc") + (blue . "#8caaee") + (lavender . "#babbf1") + (text . "#c6d0f5") + (subtext1 . "#b5bfe2") + (subtext0 . "#a5adce") + (overlay2 . "#949cbb") + (overlay1 . "#838ba7") + (overlay0 . "#737994") + (surface2 . "#626880") + (surface1 . "#51576d") + (surface0 . "#414559") + (base . "#303446") + (mantle . "#292c3c") + (crust . "#232634")) + "Colors used for catppuccin-frappe." + :tag "Frappe Colors" + :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust) + :type '(alist :key-type symbol :value-type string) + :group 'catppuccin) + +(defcustom catppuccin-latte-colors '((rosewater . "#dc8a78") + (flamingo . "#dd7878") + (pink . "#ea76cb") + (mauve . "#8839ef") + (red . "#d20f39") + (maroon . "#e64553") + (peach . "#fe640b") + (yellow . "#df8e1d") + (green . "#40a02b") + (teal . "#179299") + (sky . "#04a5e5") + (sapphire . "#209fb5") + (blue . "#1e66f5") + (lavender . "#7287fd") + (text . "#4c4f69") + (subtext1 . "#5c5f77") + (subtext0 . "#6c6f85") + (overlay2 . "#7c7f93") + (overlay1 . "#8c8fa1") + (overlay0 . "#9ca0b0") + (surface2 . "#acb0be") + (surface1 . "#bcc0cc") + (surface0 . "#ccd0da") + (base . "#eff1f5") + (mantle . "#e6e9ef") + (crust . "#dce0e8")) + "Colors used for catppuccin-latte." + :tag "Latte Colors" + :options '(rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust) + :type '(alist :key-type symbol :value-type string) + :group 'catppuccin) + +;;;; Internal functions + +(defun catppuccin-quantize-color (color) + "Quantize COLOR to a 256 color palette." + (let ((i 1) + (str "#")) + (while (<= i 5) + (setq str + (concat + str + (format + "%02x" + (* (round + (/ + (string-to-number (substring color i (+ i 2)) 16) + 17)) + 17)))) + (setq i (+ i 2))) + str)) + +;; Color operations +(let* ((hex-to-rgb (lambda (color) + (mapcar + (lambda (i) (string-to-number (substring color i (+ i 2)) 16)) + '(1 3 5)))) + (rgb-to-hex (lambda (r g b) + (format "#%02x%02x%02x" r g b))) + (rnd (lambda (n) (round (+ .5 n))))) + + (defun catppuccin-lighten (color value) + "Lighten COLOR by VALUE%." + (let* ((factor (/ value 100.0))) + (apply rgb-to-hex (mapcar (lambda (v) (funcall rnd (min 255 (+ (* (- 255 v) factor) v)))) + (funcall hex-to-rgb color))))) + + (defun catppuccin-darken (color value) + "Darken COLOR by VALUE%." + (let* ((factor (/ value 100.0))) + (apply rgb-to-hex (mapcar (lambda (v) (floor (* (- 1 factor) v))) + (funcall hex-to-rgb color)))))) + +;;;; User functions + +(defun catppuccin-reload () + "Reload the Catppuccin theme, useful for after having set custom colors with `catppuccin-set-color`." + (interactive) + (disable-theme 'catppuccin) + (load-theme 'catppuccin t)) + +(defun catppuccin-set-color (color value &optional flavor) + "Set the COLOR of FLAVOR or the current flavor to VALUE." + (interactive "SChange color: \nsSet %s to: ") + (setcdr (assoc color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors")))) value)) + +(defun catppuccin-get-color (color &optional flavor) + "Get the COLOR of FLAVOR or the current flavor." + (interactive "SThe color to get: ") + (alist-get color (symbol-value (intern-soft (concat "catppuccin-" (symbol-name (or flavor catppuccin-flavor)) "-colors"))))) + +;;;; Theme definition: +(let ((colors '((undef "#ff00ff" "#ff00ff") + (ctp-rosewater (catppuccin-get-color 'rosewater) (catppuccin-quantize-color (catppuccin-get-color 'rosewater))) + (ctp-flamingo (catppuccin-get-color 'flamingo) (catppuccin-quantize-color (catppuccin-get-color 'flamingo))) + (ctp-pink (catppuccin-get-color 'pink) (catppuccin-quantize-color (catppuccin-get-color 'pink))) + (ctp-mauve (catppuccin-get-color 'mauve) (catppuccin-quantize-color (catppuccin-get-color 'mauve))) + (ctp-red (catppuccin-get-color 'red) (catppuccin-quantize-color (catppuccin-get-color 'red))) + (ctp-maroon (catppuccin-get-color 'maroon) (catppuccin-quantize-color (catppuccin-get-color 'maroon))) + (ctp-peach (catppuccin-get-color 'peach) (catppuccin-quantize-color (catppuccin-get-color 'peach))) + (ctp-yellow (catppuccin-get-color 'yellow) (catppuccin-quantize-color (catppuccin-get-color 'yellow))) + (ctp-green (catppuccin-get-color 'green) (catppuccin-quantize-color (catppuccin-get-color 'green))) + (ctp-teal (catppuccin-get-color 'teal) (catppuccin-quantize-color (catppuccin-get-color 'teal))) + (ctp-sky (catppuccin-get-color 'sky) (catppuccin-quantize-color (catppuccin-get-color 'sky))) + (ctp-sapphire (catppuccin-get-color 'sapphire) (catppuccin-quantize-color (catppuccin-get-color 'sapphire))) + (ctp-blue (catppuccin-get-color 'blue) (catppuccin-quantize-color (catppuccin-get-color 'blue))) + (ctp-lavender (catppuccin-get-color 'lavender) (catppuccin-quantize-color (catppuccin-get-color 'lavender))) + (ctp-text (catppuccin-get-color 'text) (catppuccin-quantize-color (catppuccin-get-color 'text))) + (ctp-subtext1 (catppuccin-get-color 'subtext1) (catppuccin-quantize-color (catppuccin-get-color 'subtext1))) + (ctp-subtext0 (catppuccin-get-color 'subtext0) (catppuccin-quantize-color (catppuccin-get-color 'subtext0))) + (ctp-overlay2 (catppuccin-get-color 'overlay2) (catppuccin-quantize-color (catppuccin-get-color 'overlay2))) + (ctp-overlay1 (catppuccin-get-color 'overlay1) (catppuccin-quantize-color (catppuccin-get-color 'overlay1))) + (ctp-overlay0 (catppuccin-get-color 'overlay0) (catppuccin-quantize-color (catppuccin-get-color 'overlay0))) + (ctp-surface2 (catppuccin-get-color 'surface2) (catppuccin-quantize-color (catppuccin-get-color 'surface2))) + (ctp-surface1 (catppuccin-get-color 'surface1) (catppuccin-quantize-color (catppuccin-get-color 'surface1))) + (ctp-surface0 (catppuccin-get-color 'surface0) (catppuccin-quantize-color (catppuccin-get-color 'surface0))) + (ctp-base (catppuccin-get-color 'base) (catppuccin-quantize-color (catppuccin-get-color 'base))) + (ctp-mantle (catppuccin-get-color 'mantle) (catppuccin-quantize-color (catppuccin-get-color 'mantle))) + (ctp-crust (catppuccin-get-color 'crust) (catppuccin-quantize-color (catppuccin-get-color 'crust))) + + (ctp-current (if (eq catppuccin-flavor 'latte) + (catppuccin-darken (catppuccin-get-color 'base) 5) + (catppuccin-lighten (catppuccin-get-color 'base) 5)) + (catppuccin-quantize-color (if (eq catppuccin-flavor 'latte) + (catppuccin-darken (catppuccin-get-color 'base) 5) + (catppuccin-lighten (catppuccin-get-color 'base) 5)))))) + (faces '(;; default / basic faces + (cursor :background ,ctp-rosewater) + (default :background ,ctp-base :foreground ,ctp-text) + (default-italic :slant italic) + (hl-todo :foreground ,ctp-peach) + (error :foreground ,ctp-maroon) + (ffap :foreground ,undef) + (fringe :background ,ctp-base :foreground ,ctp-surface1) + (header-line :inherit 'mode-line) + (highlight :foreground ,ctp-text :background ,ctp-current) + (hl-line :background ,ctp-current :extend t) + (info-quoted-name :foreground ,undef) + (info-string :foreground ,ctp-green) + (lazy-highlight :foreground ,ctp-subtext1 :background ,ctp-surface1) + (link :foreground ,ctp-rosewater :underline t) + (link-unvisited :foreground ,ctp-mauve :underline t) + (linum :foreground ,ctp-surface1 :background ,ctp-base) + (line-number :foreground ,ctp-surface1 :background ,ctp-base) + (line-number-current-line :inherit line-number :foreground ,ctp-lavender) + (match :background ,ctp-surface1 :foreground ,ctp-text) + (menu :background ,ctp-current :inverse-video nil :foreground ,ctp-text) + (minibuffer-prompt :weight normal :foreground ,ctp-subtext0) + (mode-line :background ,ctp-mantle nil :foreground ,ctp-text) + (mode-line-inactive + :background ,ctp-crust :inverse-video nil :foreground ,ctp-overlay0) + (read-multiple-choice-face :inherit completions-first-difference) + (region :background ,ctp-surface0 :extend t) + (shadow :foreground ,ctp-surface2) + (success :foreground ,ctp-green) + (warning :foreground ,ctp-peach) + (tooltip :foreground ,ctp-overlay2 :background ,ctp-surface0) + (trailing-whitespace :inherit warning) + (window-divider :foreground ,ctp-mantle) + (vertical-border :foreground ,ctp-mantle) + ;; solaire-mode + (solaire-default-face :background ,ctp-mantle :foreground ,ctp-text) + (solaire-fringe-face :background ,ctp-mantle :foreground ,ctp-surface1) + (solaire-line-number-face :foreground ,ctp-surface1 :background ,ctp-mantle) + (solaire-mode-line-face :background ,ctp-crust nil :foreground ,ctp-text) + (solaire-mode-line-inactive-face + :background ,ctp-crust :inverse-video nil :foreground ,ctp-subtext1) + (solaire-header-line-face :inherit 'solaire-mode-line-face) + + ;; evil + (evil-ex-lazy-highlight :inherit lazy-highlight) + (evil-ex-substitute-matches :foreground ,ctp-red :underline t) + (evil-ex-substitute-replacement :foreground ,ctp-green :underline t) + + ;; syntax / font-lock + (font-lock-builtin-face :foreground ,ctp-lavender) + (font-lock-comment-face :inherit shadow) + (font-lock-comment-delimiter-face :inherit shadow) + (font-lock-constant-face :foreground ,ctp-peach) + (font-lock-doc-face :inherit font-lock-comment-face) + (font-lock-function-name-face :foreground ,ctp-blue) + (font-lock-keyword-face :foreground ,ctp-mauve) + (font-lock-negation-char-face :foreground ,ctp-sky) + (font-lock-preprocessor-face :foreground ,ctp-yellow) + (font-lock-reference-face :inherit font-lock-constant-face) ;; obsolete + (font-lock-regexp-grouping-backslash :foreground ,undef) + (font-lock-regexp-grouping-construct :foreground ,undef) + (font-lock-string-face :foreground ,ctp-green) + (font-lock-type-face :inherit font-lock-builtin-face) + (font-lock-variable-name-face :foreground ,ctp-text) + (font-lock-warning-face :inherit warning) + ;; auto-complete + (ac-completion-face :underline t :foreground ,undef) + ;; avy + (avy-background-face :foreground ,ctp-text :background ,ctp-base) + (avy-goto-char-timer-face :foreground ,ctp-blue :background ,ctp-surface0) + (avy-lead-face :foreground ,ctp-base :background ,ctp-mauve) + (avy-lead-face-0 :foreground ,ctp-base :background ,ctp-yellow) + (avy-lead-face-1 :foreground ,ctp-base :background ,ctp-overlay0) + (avy-lead-face-2 :foreground ,ctp-base :background ,ctp-sky) + ;; company + ;; TODO: find undef'ed faces + (company-echo-common :foreground ,ctp-base :background ,ctp-text) + (company-preview :background ,ctp-current :foreground ,undef) + (company-preview-common :inherit company-preview + :foreground ,ctp-green) + (company-preview-search :inherit company-preview + :foreground ,undef) + (company-scrollbar-bg :background ,ctp-surface0) + (company-scrollbar-fg :foreground ,undef) + (company-tooltip :inherit tooltip) + (company-tooltip-search :foreground ,undef + :underline t) + (company-tooltip-search-selection :background ,undef + :foreground ,ctp-base) + (company-tooltip-selection :inherit match) + (company-tooltip-mouse :background ,ctp-base) + (company-tooltip-common :foreground ,ctp-text :weight bold) + ;;(company-tooltip-common-selection :inherit company-tooltip-common) + (company-tooltip-annotation :foreground ,ctp-green) + (company-tooltip-annotation-selection :foreground ,ctp-mauve) + ;; completions (minibuffer.el) + (completions-annotations :inherit font-lock-comment-face) + (completions-common-part :foreground ,ctp-rosewater) + (completions-first-difference :foreground ,ctp-text) + ;; diff-hl + (diff-hl-change :foreground ,ctp-peach :background ,ctp-peach) + (diff-hl-delete :foreground ,ctp-red :background ,ctp-red) + (diff-hl-insert :foreground ,ctp-green :background ,ctp-green) + ;; diff-refine + (diff-refine-removed :weight bold) + (diff-refine-added :weight bold) + ;; git-gutter + (git-gutter:modified :foreground ,ctp-peach) + (git-gutter:deleted :foreground ,ctp-red) + (git-gutter:added :foreground ,ctp-green) + (git-gutter:seperator :inherit font-lock-comment-face) + (git-gutter:unchanged :foreground ,ctp-surface0) + ;; git-gutter fringe + (git-gutter-fr:modified :inherit git-gutter:modified) + (git-gutter-fr:deleted :inherit git-gutter:deleted) + (git-gutter-fr:added :inherit git-gutter:added) + ;; dired + (dired-flagged :foreground ,ctp-maroon :weight bold) + (dired-marked :weight bold) + (dired-mark :inherit dired-marked) + (dired-header :foreground ,ctp-sapphire :weight bold) + (dired-ignored :inherit font-lock-comment-face) + (dired-special :foreground ,ctp-yellow) + (dired-symlink :foreground ,ctp-pink) + (dired-warning :inherit warning) + (dired-directory :foreground ,ctp-blue) + (dired-perm-write :foreground ,ctp-green) + (dired-broken-symlink :foreground ,ctp-text :background ,ctp-red) + ;; dired+ (kept for legacy support) + ;; TODO (maybe): Show deprecation warning + ;; This doesn't make sense to keep around + (diredp-compressed-file-name :inherit dired-file-name) + (diredp-compressed-file-suffix :foreground ,ctp-green) + (diredp-date-time :foreground ,ctp-subtext0) + (diredp-deletion-file-name :inherit dired-flagged) + (diredp-deletion :inherit dired-flagged) + (diredp-dir-heading :inherit dired-header) + (diredp-dir-name :inherit dired-directory) + (diredp-dir-priv :inherit dired-directory) + (diredp-executable-tag :foreground ,ctp-red) + (diredp-file-suffix :inherit dired-file-name) + (diredp-flag-mark-line :inherit dired-marked) + (diredp-flag-mark :inherit dired-mark) + (diredp-ignored-file-name :foreground ,ctp-text) + (diredp-mode-line-flagged :foreground ,undef) + (diredp-mode-line-marked :foreground ,undef) + (diredp-no-priv :foreground ,ctp-surface2) + (diredp-number :foreground ,ctp-yellow) + (diredp-other-priv :inherit diredp-exec-priv) + (diredp-rare-priv :inherit diredp-exec-priv) + (diredp-read-priv :foreground ,ctp-sky) + (diredp-write-priv :inherit dired-perm-write) + (diredp-exec-priv :foreground ,ctp-red) + (diredp-symlink :inherit dired-symlink) + (diredp-link-priv :inherit dired-symlink) + (diredp-autofile-name :foreground ,undef) + (diredp-tagged-autofile-name :foreground ,undef) + ;; diredfl (more modernly published dired+) + (diredfl-file-name :inherit dired-file-name) + (diredfl-compressed-file-name :inherit dired-file-name) + (diredfl-compressed-file-suffix :foreground ,ctp-green) + (diredfl-date-time :foreground ,ctp-subtext0) + (diredfl-deletion-file-name :inherit dired-flagged) + (diredfl-deletion :inherit dired-flagged) + (diredfl-dir-heading :inherit dired-header) + (diredfl-dir-name :inherit dired-directory) + (diredfl-dir-priv :inherit dired-directory) + (diredfl-executable-tag :foreground ,ctp-red) + (diredfl-file-suffix :inherit dired-file-name) + (diredfl-flag-mark-line :inherit dired-marked) + (diredfl-flag-mark :inherit dired-mark) + (diredfl-ignored-file-name :foreground ,ctp-text) + (diredfl-mode-line-flagged :foreground ,undef) + (diredfl-mode-line-marked :foreground ,undef) + (diredfl-no-priv :foreground ,ctp-surface2) + (diredfl-number :foreground ,ctp-yellow) + (diredfl-other-priv :inherit diredfl-exec-priv) + (diredfl-rare-priv :inherit diredfl-exec-priv) + (diredfl-read-priv :foreground ,ctp-sky) + (diredfl-write-priv :inherit dired-perm-write) + (diredfl-exec-priv :foreground ,ctp-red) + (diredfl-symlink :inherit dired-symlink) + (diredfl-link-priv :inherit dired-symlink) + (diredfl-autofile-name :foreground ,undef) + (diredfl-tagged-autofile-name :foreground ,undef) + ;; eldoc-box + (eldoc-box-border :background ,ctp-current) + (eldoc-box-body :background ,ctp-current) + ;; elfeed + (elfeed-search-date-face :foreground ,ctp-subtext0) + (elfeed-search-title-face :foreground ,ctp-text) + (elfeed-search-unread-title-face :foreground ,ctp-rosewater) + (elfeed-search-feed-face :foreground ,ctp-text :weight bold) + (elfeed-search-tag-face :foreground ,ctp-green) + (elfeed-search-last-update-face :weight bold) + (elfeed-search-unread-count-face :foreground ,ctp-pink) + (elfeed-search-filter-face :foreground ,ctp-green :weight bold) + (elfeed-log-date-face :inherit elfeed-search-date-face) + (elfeed-log-error-level-face :inherit error) + (elfeed-log-warn-level-face :foreground ,ctp-peach) + (elfeed-log-info-level-face :weight bold) + (elfeed-log-debug-level-face :weight bold) + ;; elpher + (elpher-gemini-heading1 :weight bold :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-1))) + (elpher-gemini-heading2 :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-2))) + (elpher-gemini-heading3 :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-3))) + (elpher-gemini-preformatted :inherit fixed-pitch + :foreground ,ctp-green) + ;; enh-ruby + (enh-ruby-heredoc-delimiter-face :foreground ,ctp-yellow) + (enh-ruby-op-face :inherit haskell-operator-face) + (enh-ruby-regexp-delimiter-face :foreground ,ctp-yellow) + (enh-ruby-string-delimiter-face :foreground ,ctp-yellow) + ;; flyspell + (flyspell-duplicate :underline (:style wave :color ,ctp-teal)) + (flyspell-incorrect :underline (:style wave :color ,ctp-maroon)) + ;; font-latex + (font-latex-bold-face :foreground ,ctp-red :weight bold) + (font-latex-italic-face :foreground ,ctp-yellow :slant italic) + (font-latex-match-reference-keywords :foreground ,ctp-teal) + (font-latex-match-variable-keywords :foreground ,ctp-text) + (font-latex-string-face :foreground ,ctp-green) + (font-latex-warning-face :inherit warning) + ;; TODO: More latex faces to be themed, especially sections + ;; gemini + (gemini-heading-face-1 :weight bold :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-1))) + (gemini-heading-face-2 :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-2))) + (gemini-heading-face-3 :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-3))) + (gemini-heading-face-rest :foreground ,ctp-blue) + (gemini-quote-face :foreground ,ctp-green) + ;; go-test + (go-test--ok-face :inherit success) + (go-test--error-face :inherit error) + (go-test--warning-face :inherit warning) + (go-test--pointer-face :foreground ,ctp-pink) + (go-test--standard-face :foreground ,ctp-teal) + ;; haskell-mode + (haskell-operator-face :foreground ,ctp-sky) + (haskell-constructor-face :foreground ,ctp-mauve) + ;; helm + ;; TODO: Theme helm + (helm-bookmark-w3m :foreground ,undef) + (helm-buffer-not-saved :foreground ,undef) + (helm-buffer-process :foreground ,undef) + (helm-buffer-saved-out :foreground ,undef) + (helm-buffer-size :foreground ,undef) + (helm-candidate-number :foreground ,undef) + (helm-ff-directory :foreground ,undef) + (helm-ff-dotted-directory :foreground ,undef) + (helm-ff-executable :foreground ,undef) + (helm-ff-file :foreground ,undef) + (helm-ff-invalid-symlink :foreground ,undef) + (helm-ff-prefix :foreground ,undef) + (helm-ff-symlink :foreground ,undef) + (helm-grep-cmd-line :foreground ,undef) + (helm-grep-file :foreground ,undef) + (helm-grep-finish :foreground ,undef) + (helm-grep-lineno :foreground ,undef) + (helm-grep-match :inherit match) + (helm-grep-running :foreground ,undef) + (helm-header :foreground ,undef) + (helm-moccur-buffer :foreground ,undef) + (helm-selection :underline nil) + (helm-selection-line) + (helm-separator :foreground ,undef) + (helm-source-go-package-godoc-description :foreground ,undef) + (helm-source-header :foreground ,undef) + (helm-time-zone-current :foreground ,undef) + (helm-time-zone-home :foreground ,undef) + (helm-visible-mark :foreground ,undef) + ;; consult + (consult-async-split :foreground ,ctp-mauve) + ;; corfu + (corfu-default :background ,ctp-surface0) + (corfu-current :background ,ctp-surface1) + (corfu-bar :background ,ctp-subtext0) + (corfu-border :inherit corfu-default) + (corfu-annotations :inherit font-lock-comment-face) + (corfu-deprecated :strike-through t) + ;; highlight-indentation minor mode + (highlight-indentation-face :background ,ctp-mantle) + ;; icicle + ;; TODO: Verify this looks proper + (icicle-whitespace-highlight :background ,ctp-text) + (icicle-special-candidate :foreground ,ctp-subtext1) + (icicle-extra-candidate :foreground ,ctp-subtext1) + (icicle-search-main-regexp-others :foreground ,ctp-text) + (icicle-search-current-input :foreground ,ctp-pink) + (icicle-search-context-level-8 :foreground ,ctp-blue) + (icicle-search-context-level-7 :foreground ,ctp-blue) + (icicle-search-context-level-6 :foreground ,ctp-blue) + (icicle-search-context-level-5 :foreground ,ctp-blue) + (icicle-search-context-level-4 :foreground ,ctp-blue) + (icicle-search-context-level-3 :foreground ,ctp-blue) + (icicle-search-context-level-2 :foreground ,ctp-blue) + (icicle-search-context-level-1 :foreground ,ctp-blue) + (icicle-search-main-regexp-current :foreground ,ctp-text) + (icicle-saved-candidate :foreground ,ctp-text) + (icicle-proxy-candidate :foreground ,ctp-text) + (icicle-mustmatch-completion :foreground ,ctp-mauve) + (icicle-multi-command-completion :foreground ,ctp-subtext0) + (icicle-msg-emphasis :foreground ,ctp-green) + (icicle-mode-line-help :foreground ,ctp-overlay2) + (icicle-match-highlight-minibuffer :foreground ,ctp-mauve) + (icicle-match-highlight-Completions :foreground ,ctp-green) + (icicle-key-complete-menu-local :foreground ,ctp-text) + (icicle-key-complete-menu :foreground ,ctp-text) + (icicle-input-completion-fail-lax :foreground ,ctp-maroon) + (icicle-input-completion-fail :foreground ,ctp-maroon) + (icicle-historical-candidate-other :foreground ,ctp-text) + (icicle-historical-candidate :foreground ,ctp-text) + (icicle-current-candidate-highlight :foreground ,ctp-pink) + (icicle-Completions-instruction-2 :foreground ,ctp-overlay2) + (icicle-Completions-instruction-1 :foreground ,ctp-overlay2) + (icicle-completion :foreground ,ctp-text) + (icicle-complete-input :foreground ,ctp-peach) + (icicle-common-match-highlight-Completions :foreground ,ctp-mauve) + (icicle-candidate-part :foreground ,ctp-text) + (icicle-annotation :foreground ,ctp-overlay2) + ;; icomplete + (icompletep-determined :foreground ,ctp-blue) + ;; ido + (ido-first-match :foreground ,ctp-green) + (ido-only-match :foreground ,ctp-green) + (ido-subdir :inherit dired-directory) + (ido-virtual :foreground ,ctp-sapphire) + (ido-incomplete-regexp :inherit warning) + (ido-indicator :foreground ,ctp-text :weight bold) + ;; ivy + (ivy-current-match :background ,ctp-blue :foreground ,ctp-mantle :bold t) + (ivy-action :background nil :foreground ,ctp-lavender) + (ivy-grep-line-number :background nil :foreground ,ctp-peach) + (ivy-minibuffer-match-face-1 :background nil :foreground ,ctp-blue :bold t) + (ivy-minibuffer-match-face-2 :background nil :foreground ,ctp-sapphire) + (ivy-minibuffer-match-face-3 :background nil :foreground ,ctp-lavender) + (ivy-minibuffer-match-face-4 :background nil :foreground ,ctp-mauve) + (ivy-minibuffer-match-highlight :foreground ,ctp-blue) + (ivy-grep-info :foreground ,ctp-blue) + (ivy-grep-line-number :foreground ,ctp-mauve) + (ivy-confirm-face :foreground ,ctp-green) + (ivy-remote :foreground ,ctp-mauve) + (ivy-match-required-face :foreground ,ctp-red) + ;; isearch + (isearch :inherit match :weight bold) + (isearch-fail :inherit error) + ;; jde-java + (jde-java-font-lock-constant-face :inherit font-lock-constant-face) + (jde-java-font-lock-modifier-face :inherit font-lock-keyword-face) + (jde-java-font-lock-number-face :foreground ,ctp-text) + (jde-java-font-lock-package-face :foreground ,ctp-text) + (jde-java-font-lock-private-face :inherit font-lock-keyword-face) + (jde-java-font-lock-public-face :inherit font-lock-keyword-face) + ;; js2-mode + (js2-external-variable :foreground ,ctp-red) + (js2-function-param :inherit tree-sitter-hl-face:variable.parameter) + (js2-jsdoc-html-tag-delimiter :inherit web-mode-html-tag-bracket-face) + (js2-jsdoc-html-tag-name :inherit web-mode-html-tag-face) + (js2-jsdoc-value :foreground ,ctp-text) + (js2-private-function-call :inherit tree-sitter-hl-face:function.call) + (js2-private-member :inherit font-lock-variable-name-face) + ;; js3-mode + (js3-error-face :inherit error) + (js3-external-variable-face :foreground ,ctp-text) + (js3-function-param-face :inherit js2-function-param) + (js3-instance-member-face :inherit font-lock-variable-name-face) + (js3-jsdoc-tag-face :inherit web-mode-html-tag-face) + (js3-warning-face :inherit warning) + ;; lsp + (lsp-ui-peek-peek :background ,ctp-base) + (lsp-ui-peek-list :background ,ctp-surface2) + (lsp-ui-peek-filename :foreground ,ctp-text) + (lsp-ui-peek-line-number :foreground ,ctp-surface1) + (lsp-ui-peek-highlight :inherit highlight :distant-foreground ,ctp-base) + (lsp-ui-peek-header :foreground ,ctp-sapphire, :weight bold) + (lsp-ui-peek-footer :inherit lsp-ui-peek-header) + (lsp-ui-peek-selection :inherit match) + (lsp-ui-sideline-symbol :foreground ,ctp-subtext0) + (lsp-ui-sideline-current-symbol :foreground ,ctp-text :weight bold) + (lsp-ui-sideline-code-action :foreground ,ctp-yellow) + (lsp-ui-sideline-symbol-info :slant italic :height 0.99) + (lsp-ui-doc-background :background ,ctp-base) + (lsp-ui-doc-header :foreground ,ctp-sapphire) + ;; magit + (magit-branch-local :foreground ,ctp-teal) + (magit-branch-remote :foreground ,ctp-green) + (magit-tag :foreground ,ctp-peach) + (magit-section-heading :foreground ,ctp-blue :weight bold) + (magit-section-highlight :background ,ctp-surface0 :extend t) + (magit-diff-context-highlight :background ,ctp-surface0 + :foreground ,ctp-text + :extend t) + (magit-diff-revision-summary :foreground ,ctp-blue + :weight bold) + (magit-diff-revision-summary-highlight :foreground ,ctp-blue + :weight bold) + (magit-diff-added :foreground ,ctp-green + :extend t) + (magit-diff-added-highlight :background ,ctp-surface1 + :foreground ,ctp-green + :extend t) + (magit-diff-removed :foreground ,ctp-red + :extend t) + (magit-diff-removed-highlight :background ,ctp-surface1 + :foreground ,ctp-red + :extend t) + (magit-diff-file-heading :foreground ,ctp-text) + (magit-diff-file-heading-highlight :inherit magit-section-highlight) + (magit-diffstat-added :foreground ,ctp-green) + (magit-diffstat-removed :foreground ,ctp-red) + (magit-hash :foreground ,ctp-subtext0) + (diff-header :foreground ,ctp-blue) + (diff-hunk-header :foreground ,ctp-text :background ,ctp-surface2) + (magit-diff-hunk-heading :inherit diff-hunk-header) + (magit-diff-hunk-heading-highlight :inherit diff-hunk-header :weight bold) + (magit-item-highlight :background ,undef) + (magit-log-author :foreground ,ctp-subtext0) + (magit-process-ng :foreground ,ctp-peach :weight bold) + (magit-process-ok :foreground ,ctp-green :weight bold) + ;; markdown + (markdown-blockquote-face :foreground ,ctp-green) + (markdown-code-face :foreground ,ctp-text) + (markdown-footnote-face :foreground ,ctp-yellow) + (markdown-header-face :weight normal) + (markdown-header-face-1 + :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-1))) + (markdown-header-face-2 + :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-2))) + (markdown-header-face-3 + :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-3))) + (markdown-header-face-4 :foreground ,ctp-blue) + (markdown-header-face-5 :foreground ,ctp-blue) + (markdown-header-face-6 :foreground ,ctp-blue) + (markdown-inline-code-face :foreground ,ctp-green) + (markdown-plain-url-face :inherit link) + (markdown-pre-face :foreground ,ctp-green) + (markdown-table-face :foreground ,ctp-text) + (markdown-list-face :foreground ,ctp-mauve) + (markdown-language-keyword-face :inherit font-lock-comment-face) + ;; message + (message-header-to :foreground ,ctp-text :weight bold) + (message-header-cc :foreground ,ctp-text :weight bold) + (message-header-subject :foreground ,ctp-blue) + (message-header-newsgroups :foreground ,ctp-mauve) + (message-header-other :foreground ,ctp-mauve) + (message-header-name :foreground ,ctp-green) + (message-header-xheader :foreground ,ctp-lavender) + (message-separator :inherit font-lock-comment-face) + (message-cited-text :foreground ,ctp-green) + (message-cited-text-1 :foreground ,ctp-yellow) + (message-cited-text-2 :inherit font-lock-comment-face) + (message-cited-text-3 :inherit font-lock-comment-face) + (message-cited-text-4 :inherit font-lock-comment-face) + (message-mml :foreground ,ctp-green :weight normal) + ;; mini-modeline + (mini-modeline-mode-line :inherit mode-line :height 0.1 :box nil) + ;; mu4e + (mu4e-unread-face :foreground ,ctp-rosewater) + (mu4e-view-url-number-face :foreground ,ctp-yellow) + (mu4e-highlight-face :background ,ctp-base + :weight bold + :extend t) + (mu4e-header-highlight-face :background ,ctp-current + :foreground ,ctp-text + :underline nil :weight bold + :extend t) + (mu4e-header-key-face :inherit message-mml) + (mu4e-header-marks-face :foreground ,ctp-mauve) + (mu4e-cited-1-face :foreground ,ctp-green) + (mu4e-cited-2-face :foreground ,ctp-yellow) + (mu4e-cited-3-face :inherit font-lock-comment-face) + (mu4e-cited-4-face :inherit font-lock-comment-face) + (mu4e-cited-5-face :inherit font-lock-comment-face) + ;; neotree + (neo-banner-face :foreground ,ctp-blue :weight bold) + ;;(neo-button-face :underline nil) + (neo-dir-link-face :inherit link) + (neo-expand-btn-face :foreground ,ctp-text) + (neo-file-link-face :inherit link) + (neo-header-face :weight bold) + (neo-root-dir-face :foreground ,ctp-blue :weight bold) + (neo-vc-added-face :foreground ,ctp-green) + (neo-vc-conflict-face :inherit error) + (neo-vc-default-face :inherit default) + (neo-vc-edited-face :foreground ,ctp-peach) + (neo-vc-ignored-face :inherit font-lock-comment-face) + (neo-vc-missing-face :foreground ,ctp-maroon) + (neo-vc-needs-merge-face :foreground ,ctp-maroon + :weight bold) + ;;(neo-vc-needs-update-face :underline t) + (neo-vc-removed-face :foreground ,ctp-red) + (neo-vc-unlocked-changes-face :foreground ,ctp-red) + ;;(neo-vc-unregistered-face nil) + (neo-vc-up-to-date-face :foreground ,ctp-text) + (neo-vc-user-face :foreground ,ctp-mauve) + ;; orderless + (orderless-match-face-0 :foreground ,ctp-blue :weight bold) + (orderless-match-face-1 :foreground ,ctp-mauve :weight bold) + (orderless-match-face-2 :foreground ,ctp-teal :weight bold) + (orderless-match-face-3 :foreground ,ctp-peach :weight bold) + ;; org + (org-agenda-date :foreground ,ctp-subtext0 :weight normal) + (org-agenda-date-today :foreground ,ctp-subtext0 :weight bold) + (org-agenda-date-weekend :inherit org-agenda-date) + (org-agenda-date-weekend-today :inherit org-agenda-date :weight bold) + (org-agenda-dimmed-todo-face :inherit font-lock-comment-face) + (org-agenda-done :foreground ,ctp-green) + (org-agenda-structure :foreground ,ctp-subtext0) + (org-block :foreground ,ctp-green) + (org-code :foreground ,ctp-green) + (org-column :background ,ctp-surface0) + (org-column-title :inherit org-column :weight bold :underline t) + (org-date :inherit org-agenda-date) + (org-document-info :foreground ,ctp-sapphire) + (org-document-info-keyword :inherit font-lock-comment-face) + (org-document-title :weight bold :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-doc-title))) + (org-done :inherit font-lock-comment-face) + (org-ellipsis :inherit font-lock-comment-face) + (org-footnote :foreground ,ctp-mauve) + (org-formula :foreground ,ctp-pink) + (org-headline-done :inherit org-done) + (org-hide :foreground ,ctp-crust :background ,ctp-base) + (org-level-1 :inherit bold :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-1))) + (org-level-2 :inherit bold :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-2))) + (org-level-3 :weight normal :foreground ,ctp-blue + ,@(when catppuccin-enlarge-headings + (list :height catppuccin-height-title-3))) + (org-level-4 :weight normal :foreground ,ctp-blue) + (org-level-5 :weight normal :foreground ,ctp-blue) + (org-level-6 :weight normal :foreground ,ctp-blue) + (org-level-7 :weight normal :foreground ,ctp-blue) + (org-level-8 :weight normal :foreground ,ctp-blue) + (org-link :inherit link) + (org-priority :foreground ,ctp-yellow) + (org-quote :inherit markdown-blockquote-face) + (org-scheduled :foreground ,ctp-green) + (org-scheduled-previously :foreground ,ctp-teal) + (org-scheduled-today :foreground ,ctp-green :weight bold) + (org-sexp-date :foreground ,ctp-subtext0) + (org-special-keyword :inherit font-lock-keyword-face) + (org-table :foreground ,ctp-surface2) + (org-tag :foreground ,ctp-mauve :weight bold) + (org-todo :foreground ,ctp-peach) + (org-upcoming-deadline :foreground ,ctp-maroon) + (org-verbatim :inherit org-quote) + (org-warning :inherit warning) + ;; calfw + (cfw:face-title :foreground ,ctp-blue :weight bold :height 1.5) + (cfw:face-header :foreground ,ctp-text) + (cfw:face-sunday :foreground ,ctp-overlay1) + (cfw:face-saturday :foreground ,ctp-overlay1) + (cfw:face-holiday :foreground ,ctp-green) + (cfw:face-grid :foreground ,ctp-surface0) + (cfw:face-default-content :foreground ,ctp-peach) + (cfw:face-periods :foreground ,undef) + (cfw:face-day-title :foreground ,ctp-subtext0) + (cfw:face-default-day :foreground ,ctp-text) + (cfw:face-annotation :foreground ,undef) + (cfw:face-disable :foreground ,ctp-surface1) + (cfw:face-today-title :foreground ,ctp-peach) + (cfw:face-today :inherit cfw:face-today-title) + (cfw:face-select :background ,ctp-surface1 :foregournd ,ctp-text) + (cfw:face-toolbar :background ,ctp-base) + (cfw:face-toolbar-button-off :foreground ,ctp-rosewater) + (cfw:face-toolbar-button-on :foreground ,ctp-mauve) + ;; outline + (outline-1 :foreground ,ctp-blue) + (outline-2 :foreground ,ctp-blue) + (outline-3 :foreground ,ctp-blue) + (outline-4 :foreground ,ctp-blue) + (outline-5 :foreground ,ctp-blue) + (outline-6 :foreground ,ctp-blue) + ;; perspective + (persp-selected-face :weight bold :foreground ,ctp-pink) + ;; rainbow-delimiters + (rainbow-delimiters-depth-1-face :foreground ,ctp-red) + (rainbow-delimiters-depth-2-face :foreground ,ctp-peach) + (rainbow-delimiters-depth-3-face :foreground ,ctp-yellow) + (rainbow-delimiters-depth-4-face :foreground ,ctp-green) + (rainbow-delimiters-depth-5-face :foreground ,ctp-sapphire) + (rainbow-delimiters-depth-6-face :foreground ,ctp-red) + (rainbow-delimiters-depth-7-face :foreground ,ctp-peach) + (rainbow-delimiters-depth-8-face :foreground ,ctp-yellow) + (rainbow-delimiters-unmatched-face :inherit warning) + ;; rst (reStructuredText) + (rst-level-1 :foreground ,ctp-blue) + (rst-level-2 :foreground ,ctp-blue) + (rst-level-3 :foreground ,ctp-blue) + (rst-level-4 :foreground ,ctp-blue) + (rst-level-5 :foreground ,ctp-blue) + (rst-level-6 :foreground ,ctp-blue) + (rst-level-7 :foreground ,ctp-blue) + (rst-level-8 :foreground ,ctp-blue) + ;; show-paren + (show-paren-match :foreground ,ctp-pink + :weight bold) + (show-paren-match-expression :inherit match) + (show-paren-mismatch :inherit warning) + ;; slime + (slime-repl-inputed-output-face :foreground ,ctp-mauve) + ;; spam + (spam :inherit gnus-summary-normal-read :foreground ,ctp-peach + :strike-through t :slant oblique) + ;; tab-bar & tab-line (since Emacs 27.1) + (tab-bar :foreground ,ctp-subtext0 :background ,ctp-base) + (tab-bar-tab :foreground ,ctp-text :background ,ctp-current) + (tab-bar-tab-inactive :foreground ,ctp-subtext0 :background ,ctp-base) + (tab-line :inherit tab-bar) + (tab-line-tab :inherit tab-bar-tab) + (tab-line-tab-inactive :inherit tab-bar-tab-inactive) + (tab-line-tab-current :inherit tab-line-tab) + (tab-line-highlight :background ,ctp-surface1) + ;; centaur-tabs + (centaur-tabs-default :foreground ,ctp-subtext0, :background ,ctp-base) + (centaur-tabs-unselected :foreground ,ctp-subtext0 :background ,ctp-mantle) + (centaur-tabs-selected :foreground ,ctp-text :background ,ctp-current) + (centaur-tabs-unselected-modified :foreground ,ctp-maroon :background ,ctp-mantle) + (centaur-tabs-selected-modified :foreground ,ctp-red :background ,ctp-current) + (centaur-tabs-close-unselected :foreground ,ctp-subtext0 :background ,ctp-mantle) + (centaur-tabs-close-selected :foreground ,ctp-text :background ,ctp-current) + (centaur-tabs-name-mouse-face :foreground ,ctp-text :background ,ctp-surface1) + (centaur-tabs-close-mouse-face :foreground ,ctp-red :background ,ctp-surface1) + (centaur-tabs-modified-marker-selected :inherit centaur-tabs-selected-modified) + (centaur-tabs-modified-marker-unselected :inherit centaur-tabs-unselected-modified) + ;; term + (term :foreground ,ctp-text :background ,ctp-base) + (term-color-black ,@(if (eq catppuccin-flavor 'latte) + (list :foreground ctp-subtext1 :background ctp-subtext1) + (list :foreground ctp-surface1 :background ctp-surface1))) + (term-color-black-white ,@(if (eq catppuccin-flavor 'latte) + (list :foreground ctp-subtext0 :background ctp-subtext0) + (list :foreground ctp-surface2 :background ctp-surface2))) + (term-color-red :foreground ,ctp-red :background ,ctp-red) + (term-color-bright-red :foreground ,ctp-red :background ,ctp-red) + (term-color-green :foreground ,ctp-green :background ,ctp-green) + (term-color-bright-green :foreground ,ctp-green :background ,ctp-green) + (term-color-yellow :foreground ,ctp-yellow :background ,ctp-yellow) + (term-color-bright-yellow :foreground ,ctp-yellow :background ,ctp-yellow) + (term-color-blue :foreground ,ctp-blue :background ,ctp-blue) + (term-color-bright-blue :foreground ,ctp-blue :background ,ctp-blue) + (term-color-magenta :foreground ,ctp-pink :background ,ctp-pink) + (term-color-bright-magenta :foreground ,ctp-pink :background ,ctp-pink) + (term-color-cyan :foreground ,ctp-teal :background ,ctp-teal) + (term-color-bright-cyan :foreground ,ctp-teal :background ,ctp-teal) + (term-color-white ,@(if (eq catppuccin-flavor 'latte) + (list :foreground ctp-surface2 :background ctp-surface2) + (list :foreground ctp-subtext1 :background ctp-subtext1))) + (term-color-bright-white ,@(if (eq catppuccin-flavor 'latte) + (list :foreground ctp-surface1 :background ctp-surface1) + (list :foreground ctp-subtext0 :background ctp-subtext0))) + ;; tree-sitter + (tree-sitter-hl-face:attribute :inherit font-lock-constant-face) + (tree-sitter-hl-face:comment :inherit font-lock-comment-face) + (tree-sitter-hl-face:constant :inherit font-lock-constant-face) + (tree-sitter-hl-face:constant.builtin :inherit font-lock-builtin-face) + (tree-sitter-hl-face:constructor :inherit font-lock-constant-face) + (tree-sitter-hl-face:escape :foreground ,undef) + (tree-sitter-hl-face:function :inherit font-lock-function-name-face) + (tree-sitter-hl-face:function.builtin :inherit font-lock-builtin-face) + (tree-sitter-hl-face:function.call :inherit font-lock-function-name-face + :weight normal) + (tree-sitter-hl-face:function.macro :inherit font-lock-preprocessor-face) + (tree-sitter-hl-face:function.special :inherit font-lock-preprocessor-face) + (tree-sitter-hl-face:keyword :inherit font-lock-keyword-face) + (tree-sitter-hl-face:punctuation :foreground ,undef) + (tree-sitter-hl-face:punctuation.bracket :foreground ,ctp-text) + (tree-sitter-hl-face:punctuation.delimiter :foreground ,ctp-text) + (tree-sitter-hl-face:punctuation.special :foreground ,undef) + (tree-sitter-hl-face:string :inherit font-lock-string-face) + (tree-sitter-hl-face:string.special :foreground ,undef) + (tree-sitter-hl-face:tag :inherit font-lock-keyword-face) + (tree-sitter-hl-face:type :inherit font-lock-type-face) + (tree-sitter-hl-face:type.parameter :foreground ,ctp-sapphire) + (tree-sitter-hl-face:variable :inherit font-lock-variable-name-face) + (tree-sitter-hl-face:variable.parameter :foreground ,ctp-red) + ;; undo-tree + (undo-tree-visualizer-current-face :foreground ,ctp-peach) + (undo-tree-visualizer-default-face :foreground ,ctp-subtext0) + (undo-tree-visualizer-register-face :foreground ,ctp-mauve) + (undo-tree-visualizer-unmodified-face :foreground ,ctp-text) + ;; web-mode + (web-mode-builtin-face :inherit font-lock-builtin-face) + (web-mode-comment-face :inherit font-lock-comment-face) + (web-mode-constant-face :inherit font-lock-constant-face) + (web-mode-css-property-name-face :inherit font-lock-constant-face) + (web-mode-doctype-face :inherit font-lock-comment-face) + (web-mode-function-name-face :inherit font-lock-function-name-face) + (web-mode-html-attr-name-face :foreground ,ctp-blue) + (web-mode-html-attr-value-face :foreground ,ctp-green) + (web-mode-html-tag-face :foreground ,ctp-mauve) + (web-mode-keyword-face :inherit font-lock-keyword-face) + (web-mode-string-face :inherit font-lock-string-face) + (web-mode-type-face :inherit font-lock-type-face) + (web-mode-warning-face :inherit warning) + ;; which-func + (which-func :inherit font-lock-function-name-face) + ;; which-key + (which-key-key-face :inherit font-lock-builtin-face) + (which-key-command-description-face :inherit default) + (which-key-separator-face :inherit font-lock-comment-delimiter-face) + (which-key-local-map-description-face :foreground ,ctp-green) + ;; whitespace + (whitespace-big-indent :foreground ,ctp-peach) + (whitespace-empty :inherit warning) + (whitespace-hspace :background ,undef :foreground ,undef) + (whitespace-indentation :foreground ,ctp-surface0) + (whitespace-line :underline (:style wave :color ,ctp-mauve)) + (whitespace-newline :inherit font-lock-comment-face) + (whitespace-space :inherit font-lock-comment-face) + (whitespace-space-after-tab :inherit warning) + (whitespace-space-before-tab :inherit warning) + (whitespace-tab :inherit whitespace-newline) + (whitespace-trailing :inherit trailing-whitespace) + ;; yard-mode + (yard-tag-face :inherit font-lock-builtin-face) + (yard-directive-face :inherit font-lock-builtin-face) + ;; line-reminder + (line-reminder-modified-sign-face :foreground ,ctp-green) + ;; highlight-indent-guides + ;; (highlight-indent-guides-odd-face :background ,ctp-base) + ;; (highlight-indent-guides-even-face :background ,ctp-base) + (highlight-indent-guides-character-face :foreground ,ctp-surface0) + ;; (highlight-indent-guides-top-odd-face :background ,ctp-base) + ;; (highlight-indent-guides-top-even-face :background ,ctp-base) + (highlight-indent-guides-top-character-face :foreground ,ctp-pink) + ;; (highlight-indent-guides-stack-odd-face :background ,ctp-base) + ;; (highlight-indent-guides-stack-even-face :background ,ctp-base) + (highlight-indent-guides-stack-character-face :foreground ,ctp-flamingo)))) + + (apply #'custom-theme-set-faces + 'catppuccin + (let* ((expand-with-func + (lambda (func spec) + (let (reduced-color-list) + (dolist (col colors reduced-color-list) + (push (list (car col) (funcall func col)) + reduced-color-list)) + (eval `(let ,reduced-color-list + (backquote ,spec)))))) + whole-theme) + (pcase-dolist (`(,face . ,spec) faces) + (push `(,face + ((((min-colors 16777216)) ; fully graphical envs + ,(funcall expand-with-func 'cadr spec)) + (t ; terminal with 256 colors + ,(funcall expand-with-func '(lambda (v) (cadr (cdr v))) spec)))) + whole-theme)) + whole-theme)) + + (apply #'custom-theme-set-variables + 'catppuccin + (let ((get-func + (pcase (display-color-cells) + ((pred (<= 16777216)) 'car) ; fully graphical envs + (_ 'cadr)))) ; terminal withs 256 colors + `((ansi-color-names-vector + [,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-subtext1 'ctp-surface1) colors)) + ,(funcall get-func (alist-get 'ctp-red colors)) + ,(funcall get-func (alist-get 'ctp-green colors)) + ,(funcall get-func (alist-get 'ctp-yellow colors)) + ,(funcall get-func (alist-get 'ctp-blue colors)) + ,(funcall get-func (alist-get 'ctp-pink colors)) + ,(funcall get-func (alist-get 'ctp-teal colors)) + ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-surface2 'ctp-subtext1) colors))])) + `((rustic-ansi-faces + (vector + ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-subtext1 'ctp-surface1) colors)) + ,(funcall get-func (alist-get 'ctp-red colors)) + ,(funcall get-func (alist-get 'ctp-green colors)) + ,(funcall get-func (alist-get 'ctp-yellow colors)) + ,(funcall get-func (alist-get 'ctp-blue colors)) + ,(funcall get-func (alist-get 'ctp-pink colors)) + ,(funcall get-func (alist-get 'ctp-teal colors)) + ,(funcall get-func (alist-get (if (eq catppuccin-flavor 'latte) 'ctp-surface2 'ctp-subtext1) colors)))))))) + + + + +;;;###autoload +(when load-file-name + (add-to-list 'custom-theme-load-path + (file-name-as-directory (file-name-directory load-file-name)))) + +(provide-theme 'catppuccin) + +;; Unbind functions used for internal use +(fmakunbound 'catppuccin-quantize-color) +(fmakunbound 'catppuccin-lighten-color) +(fmakunbound 'catppuccin-darken-color) + +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;;; catppuccin-theme.el ends here