mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 00:38:20 -05:00
emacs start
This commit is contained in:
parent
bb51bf2e74
commit
8a5bdbb8f8
Binary file not shown.
563
emacs/.config/emacs/config.el
Normal file
563
emacs/.config/emacs/config.el
Normal file
@ -0,0 +1,563 @@
|
||||
(defvar elpaca-installer-version 0.5)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
(use-package evil-tutor)
|
||||
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
|
||||
;; set up 'SPC' as the global leader key
|
||||
(general-create-definer repo/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(repo/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(repo/leader-keys
|
||||
"b" '(:ignore t :wk "Buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(repo/leader-keys
|
||||
"d" '(:ignore t :wk "Dired")
|
||||
"d d" '(dired :wk "Open dired")
|
||||
"d j" '(dired-jump :wk "Dired jump to current")
|
||||
"d n" '(neotree-dir :wk "Open directory in neotree")
|
||||
"d p" '(peep-dired :wk "Peep-dired"))
|
||||
|
||||
(repo/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate and elisp expression")
|
||||
"e h" '(counsel-esh-history :which-key "Eshell history")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e s" '(eshell :which-key "Eshell"))
|
||||
|
||||
(repo/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h t" '(load-theme :wk "Load theme")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
"h r r" '((lambda () (interactive) (load-file "~/.config/emacs/init.el") (ignore (elpaca-process-queues))) :wk "Reload emacs config"))
|
||||
|
||||
|
||||
(repo/leader-keys
|
||||
"m" '(:ignore t :wk "Org")
|
||||
"m a" '(org-agenda :wk "Org agenda")
|
||||
"m e" '(org-export-dispatch :wk "Org export dispatch")
|
||||
"m i" '(org-toggle-item :wk "Org toggle item")
|
||||
"m t" '(org-todo :wk "Org todo")
|
||||
"m B" '(org-babel-tangle :wk "Org babel tangle")
|
||||
"m T" '(org-todo-list :wk "Org todo list"))
|
||||
|
||||
(repo/leader-keys
|
||||
"m b" '(:ignore t :wk "Tables")
|
||||
"m b -" '(org-table-insert-hline :wk "Insert hline in table"))
|
||||
|
||||
(repo/leader-keys
|
||||
"m d" '(:ignore t :wk "Date/deadline")
|
||||
"m d t" '(org-time-stamp :wk "Org time stamp"))
|
||||
|
||||
(repo/leader-keys
|
||||
"p" '(projectile-command-map :wk "Projectile"))
|
||||
|
||||
(repo/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t e" '(eshell-toggle :wk "Toggle eshell")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t n" '(neotree-toggle :wk "Toggle neotree file viewer")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"t v" '(vterm-toggle :wk "Toggle vterm"))
|
||||
|
||||
(repo/leader-keys
|
||||
"w" '(:ignore t :wk "Windows")
|
||||
;; Window splits
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w n" '(evil-window-new :wk "New window")
|
||||
"w s" '(evil-window-split :wk "Horizontal split window")
|
||||
"w v" '(evil-window-vsplit :wk "Vertical split window")
|
||||
;; Window motions
|
||||
"w h" '(evil-window-left :wk "Window left")
|
||||
"w j" '(evil-window-down :wk "Window down")
|
||||
"w k" '(evil-window-up :wk "Window up")
|
||||
"w l" '(evil-window-right :wk "Window right")
|
||||
"w w" '(evil-window-next :wk "Goto next window")
|
||||
;; Move Windows
|
||||
"w H" '(buf-move-left :wk "Buffer move left")
|
||||
"w J" '(buf-move-down :wk "Buffer move down")
|
||||
"w K" '(buf-move-up :wk "Buffer move up")
|
||||
"w L" '(buf-move-right :wk "Buffer move right"))
|
||||
)
|
||||
|
||||
(defun emacs-counsel-launcher ()
|
||||
"Create and select a frame called emacs-counsel-launcher which consists only of a minibuffer and has specific dimensions. Runs counsel-linux-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(counsel-linux-app)
|
||||
(delete-frame))))
|
||||
|
||||
(use-package app-launcher
|
||||
:elpaca '(app-launcher :host github :repo "SebastienWae/app-launcher"))
|
||||
;; create a global keyboard shortcut with the following code
|
||||
;; emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)"
|
||||
|
||||
(defun emacs-run-launcher ()
|
||||
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(app-launcher-run-app)
|
||||
(delete-frame))))
|
||||
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:if (display-graphic-p))
|
||||
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
|
||||
(require 'windmove)
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-up ()
|
||||
"Swap the current buffer and the buffer above the split.
|
||||
If there is no split, ie now window above the current one, an
|
||||
error is signaled."
|
||||
;; "Switches between the current buffer, and the buffer above the
|
||||
;; split, if possible."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'up))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No window above this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-down ()
|
||||
"Swap the current buffer and the buffer under the split.
|
||||
If there is no split, ie now window under the current one, an
|
||||
error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'down))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (or (null other-win)
|
||||
(string-match "^ \\*Minibuf" (buffer-name (window-buffer other-win))))
|
||||
(error "No window under this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-left ()
|
||||
"Swap the current buffer and the buffer on the left of the split.
|
||||
If there is no split, ie now window on the left of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'left))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No left split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-right ()
|
||||
"Swap the current buffer and the buffer on the right of the split.
|
||||
If there is no split, ie now window on the right of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'right))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No right split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner (concat user-emacs-directory "images/repo-emacs-logo.png")) ;; use custom image as banner
|
||||
(setq dashboard-center-content t) ;; set to 'nil' for left align content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5 )
|
||||
(bookmarks . 3)
|
||||
(projects . 3)
|
||||
(registers . 3)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book"))))
|
||||
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
|
||||
(use-package diminish)
|
||||
|
||||
(use-package dired-open
|
||||
:config
|
||||
(setq dired-open-extensions '(("gif" . "sxiv")
|
||||
("jpg" . "sxiv")
|
||||
("png" . "sxiv")
|
||||
("mkv" . "mpv")
|
||||
("mp4" . "mpv"))))
|
||||
|
||||
(use-package peep-dired
|
||||
:after dired
|
||||
:hook (evil-normalize-keymaps . peep-dired-hook)
|
||||
:config
|
||||
(evil-define-key 'normal dired-mode-map (kbd "h") 'dired-up-directory)
|
||||
(evil-define-key 'normal dired-mode-map (kbd "l") 'dired-open-file) ; use dired-find-file instead if not using dired-open package
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file)
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file)
|
||||
)
|
||||
|
||||
;;(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
|
||||
(set-face-attribute 'default nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "Ubuntu"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "JetBrains Mono-11"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
(setq-default line-spacing 0.12)
|
||||
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
|
||||
(global-display-line-numbers-mode 1)
|
||||
(global-visual-line-mode t)
|
||||
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
(use-package haskell-mode)
|
||||
(use-package lua-mode)
|
||||
|
||||
(use-package neotree
|
||||
:config
|
||||
(setq neo-smart-open t
|
||||
neo-show-hidden-files t
|
||||
neo-window-width 55
|
||||
neo-window-fixed-size nil
|
||||
inhibit-compacting-font-caches t
|
||||
projectile-switch-project-action 'neotree-projectile-action)
|
||||
;; truncate long file names in neotree
|
||||
(add-hook 'neo-after-create-hook
|
||||
#'(lambda (_)
|
||||
(with-current-buffer (get-buffer neo-buffer-name)
|
||||
(setq truncate-lines t)
|
||||
(setq word-wrap nil)
|
||||
(make-local-variable 'auto-hscroll-mode)
|
||||
(setq auto-hscroll-mode nil)))))
|
||||
|
||||
;; show hidden files
|
||||
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
|
||||
(electric-indent-mode -1)
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
|
||||
(eval-after-load 'org-indent '(diminish 'org-indent-mode))
|
||||
|
||||
(require 'org-tempo)
|
||||
|
||||
(use-package projectile
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook org-mode prog-mode)
|
||||
|
||||
(use-package eshell-toggle
|
||||
:custom
|
||||
(eshell-toggle-size-fraction 3)
|
||||
(eshell-toggle-use-projectile-root t)
|
||||
(eshell-toggle-run-command nil)
|
||||
(eshell-toggle-init-function #'eshell-toggle-init-ansi-term))
|
||||
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
;; eshell-syntax-highlighting -- adds fish/zsh-like syntax highlighting.
|
||||
;; eshell-rc-script -- your profile for eshell; like a bashrc for eshell.
|
||||
;; eshell-aliases-file -- sets an aliases file for the eshell.
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/bin/sh"
|
||||
vterm-max-scrollback 5000))
|
||||
|
||||
(use-package vterm-toggle
|
||||
:after vterm
|
||||
:config
|
||||
(setq vterm-toggle-fullscreen-p nil)
|
||||
(setq vterm-toggle-scope 'project)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((lambda (buffer-or-name _)
|
||||
(let ((buffer (get-buffer buffer-or-name)))
|
||||
(with-current-buffer buffer
|
||||
(or (equal major-mode 'vterm-mode)
|
||||
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||
;;(direction . bottom)
|
||||
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.3))))
|
||||
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(repo/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t)) ; if nil, italics is universally disabled
|
||||
|
||||
|
||||
(load-theme 'minimal-mistakes t)
|
||||
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 90)) ; For all new frames henceforth
|
||||
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-idle-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " → " ))
|
805
emacs/.config/emacs/config.org
Normal file
805
emacs/.config/emacs/config.org
Normal file
@ -0,0 +1,805 @@
|
||||
#+TITLE: DT's GNU Emacs Config
|
||||
#+AUTHOR: Derek Taylor (DT)
|
||||
#+DESCRIPTION: DT's personal Emacs config.
|
||||
#+STARTUP: showeverything
|
||||
#+OPTIONS: toc:2
|
||||
|
||||
* TABLE OF CONTENTS :toc:
|
||||
- [[#important-programs-to-load-first][IMPORTANT PROGRAMS TO LOAD FIRST]]
|
||||
- [[#elpaca-package-manager][Elpaca Package Manager]]
|
||||
- [[#load-evil-mode][Load Evil Mode]]
|
||||
- [[#general-keybindings][General Keybindings]]
|
||||
- [[#app-launchers][APP LAUNCHERS]]
|
||||
- [[#counsel-linux-app][Counsel-Linux-App]]
|
||||
- [[#app-launcher][App-Launcher]]
|
||||
- [[#all-the-icons][ALL THE ICONS]]
|
||||
- [[#buffer-move][BUFFER-MOVE]]
|
||||
- [[#company][COMPANY]]
|
||||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#diminish][DIMINISH]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#flycheck][FLYCHECK]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#setting-the-font-face][Setting the Font Face]]
|
||||
- [[#zooming-inout][Zooming In/Out]]
|
||||
- [[#graphical-user-interface-tweaks][GRAPHICAL USER INTERFACE TWEAKS]]
|
||||
- [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]]
|
||||
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
|
||||
- [[#ivy-counsel][IVY (COUNSEL)]]
|
||||
- [[#language-support][LANGUAGE SUPPORT]]
|
||||
- [[#neotree][NEOTREE]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
- [[#enabling-table-of-contents][Enabling Table of Contents]]
|
||||
- [[#enabling-org-bullets][Enabling Org Bullets]]
|
||||
- [[#disable-electric-indent][Disable Electric Indent]]
|
||||
- [[#diminish-org-indent-mode][Diminish Org Indent Mode]]
|
||||
- [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]]
|
||||
- [[#projectile][PROJECTILE]]
|
||||
- [[#rainbow-mode][RAINBOW MODE]]
|
||||
- [[#reload-emacs][RELOAD EMACS]]
|
||||
- [[#shells-and-terminals][SHELLS AND TERMINALS]]
|
||||
- [[#eshell][Eshell]]
|
||||
- [[#vterm][Vterm]]
|
||||
- [[#vterm-toggle][Vterm-Toggle]]
|
||||
- [[#sudo-edit][SUDO EDIT]]
|
||||
- [[#theme][THEME]]
|
||||
- [[#transparency][TRANSPARENCY]]
|
||||
- [[#which-key][WHICH-KEY]]
|
||||
|
||||
* IMPORTANT PROGRAMS TO LOAD FIRST
|
||||
** Elpaca Package Manager
|
||||
#+begin_src emacs-lisp
|
||||
(defvar elpaca-installer-version 0.5)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
#+end_src
|
||||
|
||||
** Load Evil Mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
(use-package evil-tutor)
|
||||
#+end_src
|
||||
|
||||
** General Keybindings
|
||||
#+begin_src emacs-lisp
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
|
||||
;; set up 'SPC' as the global leader key
|
||||
(general-create-definer repo/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(repo/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(repo/leader-keys
|
||||
"b" '(:ignore t :wk "Buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(repo/leader-keys
|
||||
"d" '(:ignore t :wk "Dired")
|
||||
"d d" '(dired :wk "Open dired")
|
||||
"d j" '(dired-jump :wk "Dired jump to current")
|
||||
"d n" '(neotree-dir :wk "Open directory in neotree")
|
||||
"d p" '(peep-dired :wk "Peep-dired"))
|
||||
|
||||
(repo/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate and elisp expression")
|
||||
"e h" '(counsel-esh-history :which-key "Eshell history")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e s" '(eshell :which-key "Eshell"))
|
||||
|
||||
(repo/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h t" '(load-theme :wk "Load theme")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
"h r r" '((lambda () (interactive) (load-file "~/.config/emacs/init.el") (ignore (elpaca-process-queues))) :wk "Reload emacs config"))
|
||||
|
||||
|
||||
(repo/leader-keys
|
||||
"m" '(:ignore t :wk "Org")
|
||||
"m a" '(org-agenda :wk "Org agenda")
|
||||
"m e" '(org-export-dispatch :wk "Org export dispatch")
|
||||
"m i" '(org-toggle-item :wk "Org toggle item")
|
||||
"m t" '(org-todo :wk "Org todo")
|
||||
"m B" '(org-babel-tangle :wk "Org babel tangle")
|
||||
"m T" '(org-todo-list :wk "Org todo list"))
|
||||
|
||||
(repo/leader-keys
|
||||
"m b" '(:ignore t :wk "Tables")
|
||||
"m b -" '(org-table-insert-hline :wk "Insert hline in table"))
|
||||
|
||||
(repo/leader-keys
|
||||
"m d" '(:ignore t :wk "Date/deadline")
|
||||
"m d t" '(org-time-stamp :wk "Org time stamp"))
|
||||
|
||||
(repo/leader-keys
|
||||
"p" '(projectile-command-map :wk "Projectile"))
|
||||
|
||||
(repo/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t e" '(eshell-toggle :wk "Toggle eshell")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t n" '(neotree-toggle :wk "Toggle neotree file viewer")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"t v" '(vterm-toggle :wk "Toggle vterm"))
|
||||
|
||||
(repo/leader-keys
|
||||
"w" '(:ignore t :wk "Windows")
|
||||
;; Window splits
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w n" '(evil-window-new :wk "New window")
|
||||
"w s" '(evil-window-split :wk "Horizontal split window")
|
||||
"w v" '(evil-window-vsplit :wk "Vertical split window")
|
||||
;; Window motions
|
||||
"w h" '(evil-window-left :wk "Window left")
|
||||
"w j" '(evil-window-down :wk "Window down")
|
||||
"w k" '(evil-window-up :wk "Window up")
|
||||
"w l" '(evil-window-right :wk "Window right")
|
||||
"w w" '(evil-window-next :wk "Goto next window")
|
||||
;; Move Windows
|
||||
"w H" '(buf-move-left :wk "Buffer move left")
|
||||
"w J" '(buf-move-down :wk "Buffer move down")
|
||||
"w K" '(buf-move-up :wk "Buffer move up")
|
||||
"w L" '(buf-move-right :wk "Buffer move right"))
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
* APP LAUNCHERS
|
||||
|
||||
** Counsel-Linux-App
|
||||
Since we have counsel installed, we can use =counsel-linux-app= to launch our Linux apps. It list the apps by their executable command, so it's kind of tricky to use.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun emacs-counsel-launcher ()
|
||||
"Create and select a frame called emacs-counsel-launcher which consists only of a minibuffer and has specific dimensions. Runs counsel-linux-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(counsel-linux-app)
|
||||
(delete-frame))))
|
||||
|
||||
#+end_src
|
||||
|
||||
** App-Launcher
|
||||
The =app-launcher= is a better run launcher since it reads the desktop applications on your system and you can search them by their names as defined in their desktop file. This means that sometimes you have to search for a generic term rather than the actual binary command of the program.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package app-launcher
|
||||
:elpaca '(app-launcher :host github :repo "SebastienWae/app-launcher"))
|
||||
;; create a global keyboard shortcut with the following code
|
||||
;; emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)"
|
||||
|
||||
(defun emacs-run-launcher ()
|
||||
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(app-launcher-run-app)
|
||||
(delete-frame))))
|
||||
|
||||
#+end_src
|
||||
|
||||
* ALL THE ICONS
|
||||
This is an icon set that can be used with dashboard, dired, ibuffer and other Emacs programs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:if (display-graphic-p))
|
||||
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
#+end_src
|
||||
|
||||
* BUFFER-MOVE
|
||||
Creating some functions to allow us to easily move windows (splits) around. The following block of code was taken from buffer-move.el found on the EmacsWiki:
|
||||
https://www.emacswiki.org/emacs/buffer-move.el
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'windmove)
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-up ()
|
||||
"Swap the current buffer and the buffer above the split.
|
||||
If there is no split, ie now window above the current one, an
|
||||
error is signaled."
|
||||
;; "Switches between the current buffer, and the buffer above the
|
||||
;; split, if possible."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'up))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No window above this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-down ()
|
||||
"Swap the current buffer and the buffer under the split.
|
||||
If there is no split, ie now window under the current one, an
|
||||
error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'down))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (or (null other-win)
|
||||
(string-match "^ \\*Minibuf" (buffer-name (window-buffer other-win))))
|
||||
(error "No window under this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-left ()
|
||||
"Swap the current buffer and the buffer on the left of the split.
|
||||
If there is no split, ie now window on the left of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'left))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No left split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-right ()
|
||||
"Swap the current buffer and the buffer on the right of the split.
|
||||
If there is no split, ie now window on the right of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'right))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No right split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
#+end_src
|
||||
|
||||
* COMPANY
|
||||
[[https://company-mode.github.io/][Company]] is a text completion framework for Emacs. The name stands for "complete anything". Completion will start automatically after you type a few letters. Use M-n and M-p to select, <return> to complete or <tab> to complete the common part.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
#+end_src
|
||||
|
||||
* DASHBOARD
|
||||
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner (concat user-emacs-directory "images/repo-emacs-logo.png")) ;; use custom image as banner
|
||||
(setq dashboard-center-content t) ;; set to 'nil' for left align content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5 )
|
||||
(bookmarks . 3)
|
||||
(projects . 3)
|
||||
(registers . 3)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook)
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book"))))
|
||||
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
#+end_src
|
||||
|
||||
* DIMINISH
|
||||
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package diminish)
|
||||
|
||||
#+end_src
|
||||
|
||||
* DIRED
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dired-open
|
||||
:config
|
||||
(setq dired-open-extensions '(("gif" . "sxiv")
|
||||
("jpg" . "sxiv")
|
||||
("png" . "sxiv")
|
||||
("mkv" . "mpv")
|
||||
("mp4" . "mpv"))))
|
||||
|
||||
(use-package peep-dired
|
||||
:after dired
|
||||
:hook (evil-normalize-keymaps . peep-dired-hook)
|
||||
:config
|
||||
(evil-define-key 'normal dired-mode-map (kbd "h") 'dired-up-directory)
|
||||
(evil-define-key 'normal dired-mode-map (kbd "l") 'dired-open-file) ; use dired-find-file instead if not using dired-open package
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file)
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file)
|
||||
)
|
||||
|
||||
;;(add-hook 'peep-dired-hook 'evil-normalize-keymaps)
|
||||
|
||||
#+end_src
|
||||
|
||||
* FLYCHECK
|
||||
Install =luacheck= from your Linux distro's repositories for flycheck to work correctly with lua files. Install =python-pylint= for flycheck to work with python files. Haskell works with flycheck as long as =haskell-ghc= or =haskell-stack-ghc= is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
|
||||
#+end_src
|
||||
|
||||
* FONTS
|
||||
Defining the various fonts that Emacs will use.
|
||||
|
||||
** Setting the Font Face
|
||||
#+begin_src emacs-lisp
|
||||
(set-face-attribute 'default nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "Ubuntu"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "JetBrains Mono-11"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
(setq-default line-spacing 0.12)
|
||||
|
||||
#+end_src
|
||||
|
||||
** Zooming In/Out
|
||||
You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTRL plus the mouse wheel for zooming in/out.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
#+end_src
|
||||
|
||||
|
||||
* GRAPHICAL USER INTERFACE TWEAKS
|
||||
Let's make GNU Emacs look a little better.
|
||||
|
||||
** Disable Menubar, Toolbars and Scrollbars
|
||||
#+begin_src emacs-lisp
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
#+end_src
|
||||
|
||||
** Display Line Numbers and Truncated Lines
|
||||
#+begin_src emacs-lisp
|
||||
(global-display-line-numbers-mode 1)
|
||||
(global-visual-line-mode t)
|
||||
#+end_src
|
||||
|
||||
* IVY (COUNSEL)
|
||||
+ Ivy, a generic completion mechanism for Emacs.
|
||||
+ Counsel, a collection of Ivy-enhanced versions of common Emacs commands.
|
||||
+ Ivy-rich allows us to add descriptions alongside the commands in M-x.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
#+end_src
|
||||
|
||||
* LANGUAGE SUPPORT
|
||||
Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM, AWK, C, C++, Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, M4, Makefiles, Metafont, Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, Verilog, and VHDL. Other languages will require you to install additional modes.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package haskell-mode)
|
||||
(use-package lua-mode)
|
||||
|
||||
#+end_src
|
||||
* NEOTREE
|
||||
Neotree is a file tree viewer. When you open neotree, it jumps to the current file thanks to neo-smart-open. The neo-window-fixed-size setting makes the neotree width be adjustable. NeoTree provides following themes: classic, ascii, arrow, icons, and nerd. Theme can be configed by setting "two" themes for neo-theme: one for the GUI and one for the terminal. I like to use 'SPC t' for 'toggle' keybindings, so I have used 'SPC t n' for toggle-neotree.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------+---------------------------+------------|
|
||||
| neotree-toggle | /Toggle neotree/ | SPC t n |
|
||||
| neotree- dir | /Open directory in neotree/ | SPC d n |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package neotree
|
||||
:config
|
||||
(setq neo-smart-open t
|
||||
neo-show-hidden-files t
|
||||
neo-window-width 55
|
||||
neo-window-fixed-size nil
|
||||
inhibit-compacting-font-caches t
|
||||
projectile-switch-project-action 'neotree-projectile-action)
|
||||
;; truncate long file names in neotree
|
||||
(add-hook 'neo-after-create-hook
|
||||
#'(lambda (_)
|
||||
(with-current-buffer (get-buffer neo-buffer-name)
|
||||
(setq truncate-lines t)
|
||||
(setq word-wrap nil)
|
||||
(make-local-variable 'auto-hscroll-mode)
|
||||
(setq auto-hscroll-mode nil)))))
|
||||
|
||||
;; show hidden files
|
||||
#+end_src
|
||||
|
||||
* ORG MODE
|
||||
** Enabling Table of Contents
|
||||
#+begin_src emacs-lisp
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
#+end_src
|
||||
|
||||
** Enabling Org Bullets
|
||||
Org-bullets gives us attractive bullets rather than asterisks.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
#+end_src
|
||||
|
||||
** Disable Electric Indent
|
||||
Org mode source blocks have some really weird and annoying default indentation behavior. I think this has to do with electric-indent-mode, which is turned on by default in Emacs, and the fact that Org defaults to indenting 2 spaces in source blocks. So let's turn it all of that OFF!
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(electric-indent-mode -1)
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
#+end_src
|
||||
|
||||
** Diminish Org Indent Mode
|
||||
Removes "Ind" from showing in the modeline.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(eval-after-load 'org-indent '(diminish 'org-indent-mode))
|
||||
|
||||
#+end_src
|
||||
|
||||
** Source Code Block Tag Expansion
|
||||
Org-tempo is not a separate package but a module within org that can be enabled. Org-tempo allows for '<s' followed by TAB to expand to a begin_src tag. Other expansions available include:
|
||||
|
||||
| Typing the below + TAB | Expands to ... |
|
||||
|------------------------+-----------------------------------------|
|
||||
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||
| <c | '#+BEGIN_CENTER' … '#+END_CENTER' |
|
||||
| <C | '#+BEGIN_COMMENT' … '#+END_COMMENT' |
|
||||
| <e | '#+BEGIN_EXAMPLE' … '#+END_EXAMPLE' |
|
||||
| <E | '#+BEGIN_EXPORT' … '#+END_EXPORT' |
|
||||
| <h | '#+BEGIN_EXPORT html' … '#+END_EXPORT' |
|
||||
| <l | '#+BEGIN_EXPORT latex' … '#+END_EXPORT' |
|
||||
| <q | '#+BEGIN_QUOTE' … '#+END_QUOTE' |
|
||||
| <s | '#+BEGIN_SRC' … '#+END_SRC' |
|
||||
| <v | '#+BEGIN_VERSE' … '#+END_VERSE' |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'org-tempo)
|
||||
#+end_src
|
||||
|
||||
* PROJECTILE
|
||||
[[https://github.com/bbatsov/projectile][Projectile]] is a project interaction library for Emacs. It should be noted that many projectile commands do not work if you have set "fish" as the "shell-file-name" for Emacs. I had initially set "fish" as the "shell-file-name" in the Vterm section of this config, but oddly enough I changed it to "bin/sh" and projectile now works as expected, and Vterm still uses "fish" because my default user "sh" on my Linux system is "fish".
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package projectile
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
#+end_src
|
||||
|
||||
* RAINBOW MODE
|
||||
Display the actual color as a background for any hex color value (ex. #ffffff). The code block below enables rainbow-mode in all programming modes (prog-mode) as well as org-mode, which is why rainbow works in this document.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook org-mode prog-mode)
|
||||
#+end_src
|
||||
|
||||
* SHELLS AND TERMINALS
|
||||
In my configs, all of my shells (bash, fish, zsh and the ESHELL) require my shell-color-scripts-git package to be installed. On Arch Linux, you can install it from the AUR. Otherwise, go to my shell-color-scripts repository on GitLab to get it.
|
||||
|
||||
** Eshell
|
||||
Eshell is an Emacs 'shell' that is written in Elisp.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package eshell-toggle
|
||||
:custom
|
||||
(eshell-toggle-size-fraction 3)
|
||||
(eshell-toggle-use-projectile-root t)
|
||||
(eshell-toggle-run-command nil)
|
||||
(eshell-toggle-init-function #'eshell-toggle-init-ansi-term))
|
||||
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
;; eshell-syntax-highlighting -- adds fish/zsh-like syntax highlighting.
|
||||
;; eshell-rc-script -- your profile for eshell; like a bashrc for eshell.
|
||||
;; eshell-aliases-file -- sets an aliases file for the eshell.
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
#+end_src
|
||||
|
||||
** Vterm
|
||||
Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets the shell to be used in M-x shell, M-x term, M-x ansi-term and M-x vterm. By default, the shell is set to 'fish' but could change it to 'bash' or 'zsh' if you prefer.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/bin/sh"
|
||||
vterm-max-scrollback 5000))
|
||||
#+end_src
|
||||
|
||||
** Vterm-Toggle
|
||||
[[https://github.com/jixiuf/vterm-toggle][vterm-toggle]] toggles between the vterm buffer and whatever buffer you are editing.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vterm-toggle
|
||||
:after vterm
|
||||
:config
|
||||
(setq vterm-toggle-fullscreen-p nil)
|
||||
(setq vterm-toggle-scope 'project)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((lambda (buffer-or-name _)
|
||||
(let ((buffer (get-buffer buffer-or-name)))
|
||||
(with-current-buffer buffer
|
||||
(or (equal major-mode 'vterm-mode)
|
||||
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||
;;(direction . bottom)
|
||||
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.3))))
|
||||
#+end_src
|
||||
|
||||
* SUDO EDIT
|
||||
[[https://github.com/nflath/sudo-edit][sudo-edit]] gives us the ability to open files with sudo privileges or switch over to editing with sudo privileges if we initially opened the file without such privileges.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(repo/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
#+end_src
|
||||
|
||||
* THEME
|
||||
The first of the two lines below designates the directory where will place all of our themes. The second line loads our chosen theme which is *repo-macs*, a theme that I created with the help of the [[https://emacsfodder.github.io/emacs-theme-editor/][Emacs Theme Editor]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t)) ; if nil, italics is universally disabled
|
||||
|
||||
|
||||
(load-theme 'minimal-mistakes t)
|
||||
#+end_src
|
||||
|
||||
* TRANSPARENCY
|
||||
With Emacs version 29, true transparency has been added.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 90)) ; For all new frames henceforth
|
||||
|
||||
#+end_src
|
||||
|
||||
* WHICH-KEY
|
||||
#+begin_src emacs-lisp
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-idle-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " → " ))
|
||||
#+end_src
|
||||
|
1
emacs/.config/emacs/early-init.el
Normal file
1
emacs/.config/emacs/early-init.el
Normal file
@ -0,0 +1 @@
|
||||
(setq package-enable-at-startup nil)
|
23
emacs/.config/emacs/eshell/aliases
Normal file
23
emacs/.config/emacs/eshell/aliases
Normal file
@ -0,0 +1,23 @@
|
||||
# Aliases for emacs commands
|
||||
alias ff find-file $1
|
||||
|
||||
# Aliasing standard shell commands to better emacs alternatives
|
||||
alias less view-file $1
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias ls exa -al --color=always --group-directories-first $* # my preferred listing
|
||||
alias la exa -a --color=always --group-directories-first $* # all files and dirs
|
||||
alias ll exa -l --color=always --group-directories-first $* # long format
|
||||
alias lt exa -aT --color=always --group-directories-first $* # tree listing
|
||||
alias l. exa -a1 $* | grep "^\." # list hidden files
|
||||
|
||||
# Merge Xresources
|
||||
alias merge xrdb -merge ~/.Xresources
|
||||
|
||||
# Confirm before overwriting something
|
||||
alias cp cp -i $1
|
||||
alias mv mv -i $1
|
||||
alias rm rm -i $1
|
||||
|
||||
# Bare git repo alias for dotfiles
|
||||
alias config /usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME $*
|
1
emacs/.config/emacs/eshell/profile
Normal file
1
emacs/.config/emacs/eshell/profile
Normal file
@ -0,0 +1 @@
|
||||
colorscript random
|
BIN
emacs/.config/emacs/images/dtmacs-logo.png
Normal file
BIN
emacs/.config/emacs/images/dtmacs-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
emacs/.config/emacs/images/emacs-dash.png
Normal file
BIN
emacs/.config/emacs/images/emacs-dash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
emacs/.config/emacs/images/repo-emacs-logo.png
Normal file
BIN
emacs/.config/emacs/images/repo-emacs-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
4
emacs/.config/emacs/init.el
Normal file
4
emacs/.config/emacs/init.el
Normal file
@ -0,0 +1,4 @@
|
||||
(org-babel-load-file
|
||||
(expand-file-name
|
||||
"config.org"
|
||||
user-emacs-directory))
|
879
emacs/.config/emacs/themes/minimal-mistakes-theme.el
Normal file
879
emacs/.config/emacs/themes/minimal-mistakes-theme.el
Normal file
@ -0,0 +1,879 @@
|
||||
;;; minimal-mistakes-theme.el --- Minimal-Mistakes Theme
|
||||
|
||||
;; Copyright 2022-present, All rights reserved
|
||||
;;
|
||||
;; Code licensed under the MIT license
|
||||
;; SPDX-License-Identifier: MIT
|
||||
|
||||
;; Maintainer: minimal-mistakes <wayne6324@gmail.com>
|
||||
;; Author: minimal-mistakes
|
||||
;; Version: 1.0.0
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; URL: https://github.com/minimal-mistakes/emacs
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; A dark color theme available for a number of editors.
|
||||
;; This theme tries as much as possible to follow the consensual
|
||||
;; specification (see URL 'https://minimalmistakes.org/specs').
|
||||
|
||||
;;; Code:
|
||||
(deftheme minimal-mistakes)
|
||||
|
||||
|
||||
;;;; Configuration options:
|
||||
|
||||
(defgroup minimal-mistakes nil
|
||||
"Minimal-Mistakes theme options.
|
||||
|
||||
The theme has to be reloaded after changing anything in this group."
|
||||
:group 'faces)
|
||||
|
||||
(defcustom minimal-mistakes-enlarge-headings t
|
||||
"Use different font sizes for some headings and titles."
|
||||
:type 'boolean
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defcustom minimal-mistakes-height-title-1 1.3
|
||||
"Font size 100%."
|
||||
:type 'number
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defcustom minimal-mistakes-height-title-2 1.1
|
||||
"Font size 110%."
|
||||
:type 'number
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defcustom minimal-mistakes-height-title-3 1.0
|
||||
"Font size 130%."
|
||||
:type 'number
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defcustom minimal-mistakes-height-doc-title 1.44
|
||||
"Font size 144%."
|
||||
:type 'number
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defcustom minimal-mistakes-alternate-mode-line-and-minibuffer nil
|
||||
"Use less bold and pink in the minibuffer."
|
||||
:type 'boolean
|
||||
:group 'minimal-mistakes)
|
||||
|
||||
(defvar minimal-mistakes-use-24-bit-colors-on-256-colors-terms nil
|
||||
"Use true colors even on terminals announcing less capabilities.
|
||||
|
||||
Beware the use of this variable. Using it may lead to unwanted
|
||||
behavior, the most common one being an ugly blue background on
|
||||
terminals, which don't understand 24 bit colors. To avoid this
|
||||
blue background, when using this variable, one can try to add the
|
||||
following lines in their config file after having load the
|
||||
Minimal-Mistakes theme:
|
||||
|
||||
(unless (display-graphic-p)
|
||||
(set-face-background 'default \"black\" nil))
|
||||
")
|
||||
|
||||
|
||||
;;;; Theme definition:
|
||||
|
||||
;; Assigment form: VARIABLE COLOR [256-COLOR [TTY-COLOR]]
|
||||
(let ((colors '(;; Upstream theme color
|
||||
(minimal-mistakes-bg "#283036" "#283036" "#283036") ; official background
|
||||
(minimal-mistakes-fg "#e5e9f0" "#e5e9f0" "#e5e9f0") ; official foreground
|
||||
(minimal-mistakes-current "#434c5e" "#434c5e" "#434c5e") ; official current-line/selection
|
||||
(minimal-mistakes-comment "#81a1c1" "#81a1c1" "#81a1c1") ; official comment
|
||||
(minimal-mistakes-cyan "#59fff9" "#59fff9" "#a6fffc") ; official cyan
|
||||
(minimal-mistakes-green "#59ff59" "#59ff59" "#a6ffa6") ; official green
|
||||
(minimal-mistakes-orange "#ff9c59" "#ff9c59" "#ffc9a6") ; official orange
|
||||
(minimal-mistakes-pink "#ff59f9" "#ff59f9" "#ffa6fc") ; official pink
|
||||
(minimal-mistakes-purple "#9059ff" "#9059ff" "#c5a6ff") ; official purple
|
||||
(minimal-mistakes-red "#ff5959" "#ff5959" "#ffa6a6") ; official red
|
||||
(minimal-mistakes-yellow "#ffff59" "#ffff59" "#ffffa6") ; official yellow
|
||||
;; Other colors
|
||||
(bg2 "#373844" "#121212" "brightblack")
|
||||
(bg3 "#464752" "#262626" "brightblack")
|
||||
(bg4 "#565761" "#444444" "brightblack")
|
||||
(fg2 "#e2e2dc" "#e4e4e4" "brightwhite")
|
||||
(fg3 "#ccccc7" "#c6c6c6" "white")
|
||||
(fg4 "#b6b6b2" "#b2b2b2" "white")
|
||||
(other-blue "#0189cc" "#0087ff" "brightblue")))
|
||||
(faces '(;; default / basic faces
|
||||
(cursor :background ,fg3)
|
||||
(default :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-fg)
|
||||
(default-italic :slant italic)
|
||||
(error :foreground ,minimal-mistakes-red)
|
||||
(ffap :foreground ,fg4)
|
||||
(fringe :background ,minimal-mistakes-bg :foreground ,fg4)
|
||||
(header-line :background ,minimal-mistakes-bg)
|
||||
(highlight :foreground ,fg3 :background ,bg3)
|
||||
(hl-line :background ,minimal-mistakes-current :extend t)
|
||||
(info-quoted-name :foreground ,minimal-mistakes-orange)
|
||||
(info-string :foreground ,minimal-mistakes-yellow)
|
||||
(lazy-highlight :foreground ,fg2 :background ,bg2)
|
||||
(link :foreground ,minimal-mistakes-cyan :underline t)
|
||||
(linum :slant italic :foreground ,bg4 :background ,minimal-mistakes-bg)
|
||||
(line-number :slant italic :foreground ,bg4 :background ,minimal-mistakes-bg)
|
||||
(match :background ,minimal-mistakes-yellow :foreground ,minimal-mistakes-bg)
|
||||
(menu :background ,minimal-mistakes-current :inverse-video nil
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :foreground fg3)
|
||||
(list :foreground minimal-mistakes-fg)))
|
||||
(minibuffer-prompt
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :weight 'normal :foreground minimal-mistakes-fg)
|
||||
(list :weight 'bold :foreground minimal-mistakes-pink)))
|
||||
(read-multiple-choice-face :inherit completions-first-difference)
|
||||
(region :inherit match :extend t)
|
||||
(shadow :foreground ,minimal-mistakes-comment)
|
||||
(success :foreground ,minimal-mistakes-green)
|
||||
(tooltip :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-current)
|
||||
(trailing-whitespace :background ,minimal-mistakes-orange)
|
||||
(vertical-border :foreground ,bg2)
|
||||
(warning :foreground ,minimal-mistakes-orange)
|
||||
;; syntax / font-lock
|
||||
(font-lock-builtin-face :foreground ,minimal-mistakes-cyan :slant italic)
|
||||
(font-lock-comment-face :inherit shadow)
|
||||
(font-lock-comment-delimiter-face :inherit shadow)
|
||||
(font-lock-constant-face :foreground ,minimal-mistakes-purple)
|
||||
(font-lock-doc-face :foreground ,minimal-mistakes-comment)
|
||||
(font-lock-function-name-face :foreground ,minimal-mistakes-green :weight bold)
|
||||
(font-lock-keyword-face :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(font-lock-negation-char-face :foreground ,minimal-mistakes-cyan)
|
||||
(font-lock-preprocessor-face :foreground ,minimal-mistakes-orange)
|
||||
(font-lock-reference-face :inherit font-lock-constant-face) ;; obsolete
|
||||
(font-lock-regexp-grouping-backslash :foreground ,minimal-mistakes-cyan)
|
||||
(font-lock-regexp-grouping-construct :foreground ,minimal-mistakes-purple)
|
||||
(font-lock-string-face :foreground ,minimal-mistakes-yellow)
|
||||
(font-lock-type-face :inherit font-lock-builtin-face)
|
||||
(font-lock-variable-name-face :foreground ,minimal-mistakes-fg :weight bold)
|
||||
(font-lock-warning-face :inherit warning :background ,bg2)
|
||||
;; auto-complete
|
||||
(ac-completion-face :underline t :foreground ,minimal-mistakes-pink)
|
||||
;; company
|
||||
(company-echo-common :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-fg)
|
||||
(company-preview :background ,minimal-mistakes-current :foreground ,other-blue)
|
||||
(company-preview-common :inherit company-preview
|
||||
:foreground ,minimal-mistakes-pink)
|
||||
(company-preview-search :inherit company-preview
|
||||
:foreground ,minimal-mistakes-green)
|
||||
(company-scrollbar-bg :background ,minimal-mistakes-comment)
|
||||
(company-scrollbar-fg :foreground ,other-blue)
|
||||
(company-tooltip :inherit tooltip)
|
||||
(company-tooltip-search :foreground ,minimal-mistakes-green
|
||||
:underline t)
|
||||
(company-tooltip-search-selection :background ,minimal-mistakes-green
|
||||
:foreground ,minimal-mistakes-bg)
|
||||
(company-tooltip-selection :inherit match)
|
||||
(company-tooltip-mouse :background ,minimal-mistakes-bg)
|
||||
(company-tooltip-common :foreground ,minimal-mistakes-pink :weight bold)
|
||||
;;(company-tooltip-common-selection :inherit company-tooltip-common)
|
||||
(company-tooltip-annotation :foreground ,minimal-mistakes-cyan)
|
||||
;;(company-tooltip-annotation-selection :inherit company-tooltip-annotation)
|
||||
;; completions (minibuffer.el)
|
||||
(completions-annotations :inherit font-lock-comment-face)
|
||||
(completions-common-part :foreground ,minimal-mistakes-green)
|
||||
(completions-first-difference :foreground ,minimal-mistakes-pink :weight bold)
|
||||
;; diff-hl
|
||||
(diff-hl-change :foreground ,minimal-mistakes-orange :background ,minimal-mistakes-orange)
|
||||
(diff-hl-delete :foreground ,minimal-mistakes-red :background ,minimal-mistakes-red)
|
||||
(diff-hl-insert :foreground ,minimal-mistakes-green :background ,minimal-mistakes-green)
|
||||
;; dired
|
||||
(dired-directory :foreground ,minimal-mistakes-green :weight normal)
|
||||
(dired-flagged :foreground ,minimal-mistakes-pink)
|
||||
(dired-header :foreground ,fg3 :background ,minimal-mistakes-bg)
|
||||
(dired-ignored :inherit shadow)
|
||||
(dired-mark :foreground ,minimal-mistakes-fg :weight bold)
|
||||
(dired-marked :foreground ,minimal-mistakes-orange :weight bold)
|
||||
(dired-perm-write :foreground ,fg3 :underline t)
|
||||
(dired-symlink :foreground ,minimal-mistakes-yellow :weight normal :slant italic)
|
||||
(dired-warning :foreground ,minimal-mistakes-orange :underline t)
|
||||
(diredp-compressed-file-name :foreground ,fg3)
|
||||
(diredp-compressed-file-suffix :foreground ,fg4)
|
||||
(diredp-date-time :foreground ,minimal-mistakes-fg)
|
||||
(diredp-deletion-file-name :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-current)
|
||||
(diredp-deletion :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(diredp-dir-heading :foreground ,fg2 :background ,bg4)
|
||||
(diredp-dir-name :inherit dired-directory)
|
||||
(diredp-dir-priv :inherit dired-directory)
|
||||
(diredp-executable-tag :foreground ,minimal-mistakes-orange)
|
||||
(diredp-file-name :foreground ,minimal-mistakes-fg)
|
||||
(diredp-file-suffix :foreground ,fg4)
|
||||
(diredp-flag-mark-line :foreground ,fg2 :slant italic :background ,minimal-mistakes-current)
|
||||
(diredp-flag-mark :foreground ,fg2 :weight bold :background ,minimal-mistakes-current)
|
||||
(diredp-ignored-file-name :foreground ,minimal-mistakes-fg)
|
||||
(diredp-mode-line-flagged :foreground ,minimal-mistakes-orange)
|
||||
(diredp-mode-line-marked :foreground ,minimal-mistakes-orange)
|
||||
(diredp-no-priv :foreground ,minimal-mistakes-fg)
|
||||
(diredp-number :foreground ,minimal-mistakes-cyan)
|
||||
(diredp-other-priv :foreground ,minimal-mistakes-orange)
|
||||
(diredp-rare-priv :foreground ,minimal-mistakes-orange)
|
||||
(diredp-read-priv :foreground ,minimal-mistakes-purple)
|
||||
(diredp-write-priv :foreground ,minimal-mistakes-pink)
|
||||
(diredp-exec-priv :foreground ,minimal-mistakes-yellow)
|
||||
(diredp-symlink :foreground ,minimal-mistakes-orange)
|
||||
(diredp-link-priv :foreground ,minimal-mistakes-orange)
|
||||
(diredp-autofile-name :foreground ,minimal-mistakes-yellow)
|
||||
(diredp-tagged-autofile-name :foreground ,minimal-mistakes-yellow)
|
||||
;; elfeed
|
||||
(elfeed-search-date-face :foreground ,minimal-mistakes-comment)
|
||||
(elfeed-search-title-face :foreground ,minimal-mistakes-fg)
|
||||
(elfeed-search-unread-title-face :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(elfeed-search-feed-face :foreground ,minimal-mistakes-fg :weight bold)
|
||||
(elfeed-search-tag-face :foreground ,minimal-mistakes-green)
|
||||
(elfeed-search-last-update-face :weight bold)
|
||||
(elfeed-search-unread-count-face :foreground ,minimal-mistakes-pink)
|
||||
(elfeed-search-filter-face :foreground ,minimal-mistakes-green :weight bold)
|
||||
;;(elfeed-log-date-face :inherit font-lock-type-face)
|
||||
(elfeed-log-error-level-face :foreground ,minimal-mistakes-red)
|
||||
(elfeed-log-warn-level-face :foreground ,minimal-mistakes-orange)
|
||||
(elfeed-log-info-level-face :foreground ,minimal-mistakes-cyan)
|
||||
(elfeed-log-debug-level-face :foreground ,minimal-mistakes-comment)
|
||||
;; elpher
|
||||
(elpher-gemini-heading1 :inherit bold :foreground ,minimal-mistakes-pink
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-1)))
|
||||
(elpher-gemini-heading2 :inherit bold :foreground ,minimal-mistakes-purple
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-2)))
|
||||
(elpher-gemini-heading3 :weight normal :foreground ,minimal-mistakes-green
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-3)))
|
||||
(elpher-gemini-preformatted :inherit fixed-pitch
|
||||
:foreground ,minimal-mistakes-orange)
|
||||
;; enh-ruby
|
||||
(enh-ruby-heredoc-delimiter-face :foreground ,minimal-mistakes-yellow)
|
||||
(enh-ruby-op-face :foreground ,minimal-mistakes-pink)
|
||||
(enh-ruby-regexp-delimiter-face :foreground ,minimal-mistakes-yellow)
|
||||
(enh-ruby-string-delimiter-face :foreground ,minimal-mistakes-yellow)
|
||||
;; flyspell
|
||||
(flyspell-duplicate :underline (:style wave :color ,minimal-mistakes-orange))
|
||||
(flyspell-incorrect :underline (:style wave :color ,minimal-mistakes-red))
|
||||
;; font-latex
|
||||
(font-latex-bold-face :foreground ,minimal-mistakes-purple)
|
||||
(font-latex-italic-face :foreground ,minimal-mistakes-pink :slant italic)
|
||||
(font-latex-match-reference-keywords :foreground ,minimal-mistakes-cyan)
|
||||
(font-latex-match-variable-keywords :foreground ,minimal-mistakes-fg)
|
||||
(font-latex-string-face :foreground ,minimal-mistakes-yellow)
|
||||
;; gemini
|
||||
(gemini-heading-face-1 :inherit bold :foreground ,minimal-mistakes-pink
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-1)))
|
||||
(gemini-heading-face-2 :inherit bold :foreground ,minimal-mistakes-purple
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-2)))
|
||||
(gemini-heading-face-3 :weight normal :foreground ,minimal-mistakes-green
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-3)))
|
||||
(gemini-heading-face-rest :weight normal :foreground ,minimal-mistakes-yellow)
|
||||
(gemini-quote-face :foreground ,minimal-mistakes-purple)
|
||||
;; 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 ,minimal-mistakes-pink)
|
||||
(go-test--standard-face :foreground ,minimal-mistakes-cyan)
|
||||
;; gnus-group
|
||||
(gnus-group-mail-1 :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(gnus-group-mail-1-empty :inherit gnus-group-mail-1 :weight normal)
|
||||
(gnus-group-mail-2 :foreground ,minimal-mistakes-cyan :weight bold)
|
||||
(gnus-group-mail-2-empty :inherit gnus-group-mail-2 :weight normal)
|
||||
(gnus-group-mail-3 :foreground ,minimal-mistakes-comment :weight bold)
|
||||
(gnus-group-mail-3-empty :inherit gnus-group-mail-3 :weight normal)
|
||||
(gnus-group-mail-low :foreground ,minimal-mistakes-current :weight bold)
|
||||
(gnus-group-mail-low-empty :inherit gnus-group-mail-low :weight normal)
|
||||
(gnus-group-news-1 :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(gnus-group-news-1-empty :inherit gnus-group-news-1 :weight normal)
|
||||
(gnus-group-news-2 :foreground ,minimal-mistakes-cyan :weight bold)
|
||||
(gnus-group-news-2-empty :inherit gnus-group-news-2 :weight normal)
|
||||
(gnus-group-news-3 :foreground ,minimal-mistakes-comment :weight bold)
|
||||
(gnus-group-news-3-empty :inherit gnus-group-news-3 :weight normal)
|
||||
(gnus-group-news-4 :inherit gnus-group-news-low)
|
||||
(gnus-group-news-4-empty :inherit gnus-group-news-low-empty)
|
||||
(gnus-group-news-5 :inherit gnus-group-news-low)
|
||||
(gnus-group-news-5-empty :inherit gnus-group-news-low-empty)
|
||||
(gnus-group-news-6 :inherit gnus-group-news-low)
|
||||
(gnus-group-news-6-empty :inherit gnus-group-news-low-empty)
|
||||
(gnus-group-news-low :foreground ,minimal-mistakes-current :weight bold)
|
||||
(gnus-group-news-low-empty :inherit gnus-group-news-low :weight normal)
|
||||
(gnus-header-content :foreground ,minimal-mistakes-purple)
|
||||
(gnus-header-from :foreground ,minimal-mistakes-fg)
|
||||
(gnus-header-name :foreground ,minimal-mistakes-green)
|
||||
(gnus-header-subject :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(gnus-summary-markup-face :foreground ,minimal-mistakes-cyan)
|
||||
(gnus-summary-high-unread :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(gnus-summary-high-read :inherit gnus-summary-high-unread :weight normal)
|
||||
(gnus-summary-high-ancient :inherit gnus-summary-high-read)
|
||||
(gnus-summary-high-ticked :inherit gnus-summary-high-read :underline t)
|
||||
(gnus-summary-normal-unread :foreground ,other-blue :weight bold)
|
||||
(gnus-summary-normal-read :foreground ,minimal-mistakes-comment :weight normal)
|
||||
(gnus-summary-normal-ancient :inherit gnus-summary-normal-read :weight light)
|
||||
(gnus-summary-normal-ticked :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(gnus-summary-low-unread :foreground ,minimal-mistakes-comment :weight bold)
|
||||
(gnus-summary-low-read :inherit gnus-summary-low-unread :weight normal)
|
||||
(gnus-summary-low-ancient :inherit gnus-summary-low-read)
|
||||
(gnus-summary-low-ticked :inherit gnus-summary-low-read :underline t)
|
||||
(gnus-summary-selected :inverse-video t)
|
||||
;; haskell-mode
|
||||
(haskell-operator-face :foreground ,minimal-mistakes-pink)
|
||||
(haskell-constructor-face :foreground ,minimal-mistakes-purple)
|
||||
;; helm
|
||||
(helm-bookmark-w3m :foreground ,minimal-mistakes-purple)
|
||||
(helm-buffer-not-saved :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-bg)
|
||||
(helm-buffer-process :foreground ,minimal-mistakes-orange :background ,minimal-mistakes-bg)
|
||||
(helm-buffer-saved-out :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(helm-buffer-size :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(helm-candidate-number :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-fg)
|
||||
(helm-ff-directory :foreground ,minimal-mistakes-green :background ,minimal-mistakes-bg :weight bold)
|
||||
(helm-ff-dotted-directory :foreground ,minimal-mistakes-green :background ,minimal-mistakes-bg :weight normal)
|
||||
(helm-ff-executable :foreground ,other-blue :background ,minimal-mistakes-bg :weight normal)
|
||||
(helm-ff-file :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg :weight normal)
|
||||
(helm-ff-invalid-symlink :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-bg :weight bold)
|
||||
(helm-ff-prefix :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-pink :weight normal)
|
||||
(helm-ff-symlink :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-bg :weight bold)
|
||||
(helm-grep-cmd-line :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(helm-grep-file :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(helm-grep-finish :foreground ,fg2 :background ,minimal-mistakes-bg)
|
||||
(helm-grep-lineno :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(helm-grep-match :inherit match)
|
||||
(helm-grep-running :foreground ,minimal-mistakes-green :background ,minimal-mistakes-bg)
|
||||
(helm-header :foreground ,fg2 :background ,minimal-mistakes-bg :underline nil :box nil)
|
||||
(helm-moccur-buffer :foreground ,minimal-mistakes-green :background ,minimal-mistakes-bg)
|
||||
(helm-selection :background ,bg2 :underline nil)
|
||||
(helm-selection-line :background ,bg2)
|
||||
(helm-separator :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-bg)
|
||||
(helm-source-go-package-godoc-description :foreground ,minimal-mistakes-yellow)
|
||||
(helm-source-header :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-bg :underline nil :weight bold)
|
||||
(helm-time-zone-current :foreground ,minimal-mistakes-orange :background ,minimal-mistakes-bg)
|
||||
(helm-time-zone-home :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-bg)
|
||||
(helm-visible-mark :foreground ,minimal-mistakes-bg :background ,bg3)
|
||||
;; highlight-indentation minor mode
|
||||
(highlight-indentation-face :background ,bg2)
|
||||
;; icicle
|
||||
(icicle-whitespace-highlight :background ,minimal-mistakes-fg)
|
||||
(icicle-special-candidate :foreground ,fg2)
|
||||
(icicle-extra-candidate :foreground ,fg2)
|
||||
(icicle-search-main-regexp-others :foreground ,minimal-mistakes-fg)
|
||||
(icicle-search-current-input :foreground ,minimal-mistakes-pink)
|
||||
(icicle-search-context-level-8 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-7 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-6 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-5 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-4 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-3 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-2 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-context-level-1 :foreground ,minimal-mistakes-orange)
|
||||
(icicle-search-main-regexp-current :foreground ,minimal-mistakes-fg)
|
||||
(icicle-saved-candidate :foreground ,minimal-mistakes-fg)
|
||||
(icicle-proxy-candidate :foreground ,minimal-mistakes-fg)
|
||||
(icicle-mustmatch-completion :foreground ,minimal-mistakes-purple)
|
||||
(icicle-multi-command-completion :foreground ,fg2 :background ,bg2)
|
||||
(icicle-msg-emphasis :foreground ,minimal-mistakes-green)
|
||||
(icicle-mode-line-help :foreground ,fg4)
|
||||
(icicle-match-highlight-minibuffer :foreground ,minimal-mistakes-orange)
|
||||
(icicle-match-highlight-Completions :foreground ,minimal-mistakes-green)
|
||||
(icicle-key-complete-menu-local :foreground ,minimal-mistakes-fg)
|
||||
(icicle-key-complete-menu :foreground ,minimal-mistakes-fg)
|
||||
(icicle-input-completion-fail-lax :foreground ,minimal-mistakes-pink)
|
||||
(icicle-input-completion-fail :foreground ,minimal-mistakes-pink)
|
||||
(icicle-historical-candidate-other :foreground ,minimal-mistakes-fg)
|
||||
(icicle-historical-candidate :foreground ,minimal-mistakes-fg)
|
||||
(icicle-current-candidate-highlight :foreground ,minimal-mistakes-orange :background ,bg3)
|
||||
(icicle-Completions-instruction-2 :foreground ,fg4)
|
||||
(icicle-Completions-instruction-1 :foreground ,fg4)
|
||||
(icicle-completion :foreground ,minimal-mistakes-fg)
|
||||
(icicle-complete-input :foreground ,minimal-mistakes-orange)
|
||||
(icicle-common-match-highlight-Completions :foreground ,minimal-mistakes-purple)
|
||||
(icicle-candidate-part :foreground ,minimal-mistakes-fg)
|
||||
(icicle-annotation :foreground ,fg4)
|
||||
;; icomplete
|
||||
(icompletep-determined :foreground ,minimal-mistakes-orange)
|
||||
;; ido
|
||||
(ido-first-match
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :weight 'normal :foreground minimal-mistakes-green)
|
||||
(list :weight 'bold :foreground minimal-mistakes-pink)))
|
||||
(ido-only-match :foreground ,minimal-mistakes-orange)
|
||||
(ido-subdir :foreground ,minimal-mistakes-yellow)
|
||||
(ido-virtual :foreground ,minimal-mistakes-cyan)
|
||||
(ido-incomplete-regexp :inherit font-lock-warning-face)
|
||||
(ido-indicator :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-pink)
|
||||
;; ivy
|
||||
(ivy-current-match
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :weight 'normal :background minimal-mistakes-current :foreground minimal-mistakes-green)
|
||||
(list :weight 'bold :background minimal-mistakes-current :foreground minimal-mistakes-pink)))
|
||||
;; Highlights the background of the match.
|
||||
(ivy-minibuffer-match-face-1 :background ,minimal-mistakes-current)
|
||||
;; Highlights the first matched group.
|
||||
(ivy-minibuffer-match-face-2 :background ,minimal-mistakes-green
|
||||
:foreground ,minimal-mistakes-bg)
|
||||
;; Highlights the second matched group.
|
||||
(ivy-minibuffer-match-face-3 :background ,minimal-mistakes-yellow
|
||||
:foreground ,minimal-mistakes-bg)
|
||||
;; Highlights the third matched group.
|
||||
(ivy-minibuffer-match-face-4 :background ,minimal-mistakes-pink
|
||||
:foreground ,minimal-mistakes-bg)
|
||||
(ivy-confirm-face :foreground ,minimal-mistakes-orange)
|
||||
(ivy-match-required-face :foreground ,minimal-mistakes-red)
|
||||
(ivy-subdir :foreground ,minimal-mistakes-yellow)
|
||||
(ivy-remote :foreground ,minimal-mistakes-pink)
|
||||
(ivy-virtual :foreground ,minimal-mistakes-cyan)
|
||||
;; isearch
|
||||
(isearch :inherit match :weight bold)
|
||||
(isearch-fail :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-orange)
|
||||
;; jde-java
|
||||
(jde-java-font-lock-constant-face :foreground ,minimal-mistakes-cyan)
|
||||
(jde-java-font-lock-modifier-face :foreground ,minimal-mistakes-pink)
|
||||
(jde-java-font-lock-number-face :foreground ,minimal-mistakes-fg)
|
||||
(jde-java-font-lock-package-face :foreground ,minimal-mistakes-fg)
|
||||
(jde-java-font-lock-private-face :foreground ,minimal-mistakes-pink)
|
||||
(jde-java-font-lock-public-face :foreground ,minimal-mistakes-pink)
|
||||
;; js2-mode
|
||||
(js2-external-variable :foreground ,minimal-mistakes-purple)
|
||||
(js2-function-param :foreground ,minimal-mistakes-cyan)
|
||||
(js2-jsdoc-html-tag-delimiter :foreground ,minimal-mistakes-yellow)
|
||||
(js2-jsdoc-html-tag-name :foreground ,other-blue)
|
||||
(js2-jsdoc-value :foreground ,minimal-mistakes-yellow)
|
||||
(js2-private-function-call :foreground ,minimal-mistakes-cyan)
|
||||
(js2-private-member :foreground ,fg3)
|
||||
;; js3-mode
|
||||
(js3-error-face :underline ,minimal-mistakes-orange)
|
||||
(js3-external-variable-face :foreground ,minimal-mistakes-fg)
|
||||
(js3-function-param-face :foreground ,minimal-mistakes-pink)
|
||||
(js3-instance-member-face :foreground ,minimal-mistakes-cyan)
|
||||
(js3-jsdoc-tag-face :foreground ,minimal-mistakes-pink)
|
||||
(js3-warning-face :underline ,minimal-mistakes-pink)
|
||||
;; lsp
|
||||
(lsp-ui-peek-peek :background ,minimal-mistakes-bg)
|
||||
(lsp-ui-peek-list :background ,bg2)
|
||||
(lsp-ui-peek-filename :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(lsp-ui-peek-line-number :foreground ,minimal-mistakes-fg)
|
||||
(lsp-ui-peek-highlight :inherit highlight :distant-foreground ,minimal-mistakes-bg)
|
||||
(lsp-ui-peek-header :background ,bg3 :foreground ,fg3, :weight bold)
|
||||
(lsp-ui-peek-footer :inherit lsp-ui-peek-header)
|
||||
(lsp-ui-peek-selection :inherit match)
|
||||
(lsp-ui-sideline-symbol :foreground ,fg4 :box (:line-width -1 :color ,fg4) :height 0.99)
|
||||
(lsp-ui-sideline-current-symbol :foreground ,minimal-mistakes-fg :weight ultra-bold
|
||||
:box (:line-width -1 :color minimal-mistakes-fg) :height 0.99)
|
||||
(lsp-ui-sideline-code-action :foreground ,minimal-mistakes-yellow)
|
||||
(lsp-ui-sideline-symbol-info :slant italic :height 0.99)
|
||||
(lsp-ui-doc-background :background ,minimal-mistakes-bg)
|
||||
(lsp-ui-doc-header :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-cyan)
|
||||
;; magit
|
||||
(magit-branch-local :foreground ,minimal-mistakes-cyan)
|
||||
(magit-branch-remote :foreground ,minimal-mistakes-green)
|
||||
(magit-tag :foreground ,minimal-mistakes-orange)
|
||||
(magit-section-heading :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(magit-section-highlight :background ,bg3 :extend t)
|
||||
(magit-diff-context-highlight :background ,bg3
|
||||
:foreground ,fg3
|
||||
:extend t)
|
||||
(magit-diff-revision-summary :foreground ,minimal-mistakes-orange
|
||||
:background ,minimal-mistakes-bg
|
||||
:weight bold)
|
||||
(magit-diff-revision-summary-highlight :foreground ,minimal-mistakes-orange
|
||||
:background ,bg3
|
||||
:weight bold
|
||||
:extend t)
|
||||
;; the four following lines are just a patch of the
|
||||
;; upstream color to add the extend keyword.
|
||||
(magit-diff-added :background "#335533"
|
||||
:foreground "#ddffdd"
|
||||
:extend t)
|
||||
(magit-diff-added-highlight :background "#336633"
|
||||
:foreground "#cceecc"
|
||||
:extend t)
|
||||
(magit-diff-removed :background "#553333"
|
||||
:foreground "#ffdddd"
|
||||
:extend t)
|
||||
(magit-diff-removed-highlight :background "#663333"
|
||||
:foreground "#eecccc"
|
||||
:extend t)
|
||||
(magit-diff-file-heading :foreground ,minimal-mistakes-fg)
|
||||
(magit-diff-file-heading-highlight :inherit magit-section-highlight)
|
||||
(magit-diffstat-added :foreground ,minimal-mistakes-green)
|
||||
(magit-diffstat-removed :foreground ,minimal-mistakes-red)
|
||||
(magit-hash :foreground ,fg2)
|
||||
(magit-hunk-heading :background ,bg3)
|
||||
(magit-hunk-heading-highlight :background ,bg3)
|
||||
(magit-item-highlight :background ,bg3)
|
||||
(magit-log-author :foreground ,fg3)
|
||||
(magit-process-ng :foreground ,minimal-mistakes-orange :weight bold)
|
||||
(magit-process-ok :foreground ,minimal-mistakes-green :weight bold)
|
||||
;; markdown
|
||||
(markdown-blockquote-face :foreground ,minimal-mistakes-yellow
|
||||
:slant italic)
|
||||
(markdown-code-face :foreground ,minimal-mistakes-orange)
|
||||
(markdown-footnote-face :foreground ,other-blue)
|
||||
(markdown-header-face :weight normal)
|
||||
(markdown-header-face-1
|
||||
:inherit bold :foreground ,minimal-mistakes-pink
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-1)))
|
||||
(markdown-header-face-2
|
||||
:inherit bold :foreground ,minimal-mistakes-purple
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-2)))
|
||||
(markdown-header-face-3
|
||||
:foreground ,minimal-mistakes-green
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-3)))
|
||||
(markdown-header-face-4 :foreground ,minimal-mistakes-yellow)
|
||||
(markdown-header-face-5 :foreground ,minimal-mistakes-cyan)
|
||||
(markdown-header-face-6 :foreground ,minimal-mistakes-orange)
|
||||
(markdown-header-face-7 :foreground ,other-blue)
|
||||
(markdown-header-face-8 :foreground ,minimal-mistakes-fg)
|
||||
(markdown-inline-code-face :foreground ,minimal-mistakes-green)
|
||||
(markdown-plain-url-face :inherit link)
|
||||
(markdown-pre-face :foreground ,minimal-mistakes-orange)
|
||||
(markdown-table-face :foreground ,minimal-mistakes-purple)
|
||||
(markdown-list-face :foreground ,minimal-mistakes-cyan)
|
||||
(markdown-language-keyword-face :foreground ,minimal-mistakes-comment)
|
||||
;; message
|
||||
(message-header-to :foreground ,minimal-mistakes-fg :weight bold)
|
||||
(message-header-cc :foreground ,minimal-mistakes-fg :bold bold)
|
||||
(message-header-subject :foreground ,minimal-mistakes-orange)
|
||||
(message-header-newsgroups :foreground ,minimal-mistakes-purple)
|
||||
(message-header-other :foreground ,minimal-mistakes-purple)
|
||||
(message-header-name :foreground ,minimal-mistakes-green)
|
||||
(message-header-xheader :foreground ,minimal-mistakes-cyan)
|
||||
(message-separator :foreground ,minimal-mistakes-cyan :slant italic)
|
||||
(message-cited-text :foreground ,minimal-mistakes-purple)
|
||||
(message-cited-text-1 :foreground ,minimal-mistakes-purple)
|
||||
(message-cited-text-2 :foreground ,minimal-mistakes-orange)
|
||||
(message-cited-text-3 :foreground ,minimal-mistakes-comment)
|
||||
(message-cited-text-4 :foreground ,fg2)
|
||||
(message-mml :foreground ,minimal-mistakes-green :weight normal)
|
||||
;; mode-line
|
||||
(mode-line :background ,minimal-mistakes-current
|
||||
:box ,minimal-mistakes-current :inverse-video nil
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :foreground fg3)
|
||||
(list :foreground minimal-mistakes-fg)))
|
||||
(mode-line-inactive
|
||||
:background ,minimal-mistakes-bg :inverse-video nil
|
||||
,@(if minimal-mistakes-alternate-mode-line-and-minibuffer
|
||||
(list :foreground minimal-mistakes-comment :box minimal-mistakes-bg)
|
||||
(list :foreground fg4 :box bg2)))
|
||||
(mini-modeline-mode-line :inherit mode-line :height 0.1 :box nil)
|
||||
;; mu4e
|
||||
(mu4e-unread-face :foreground ,minimal-mistakes-pink :weight normal)
|
||||
(mu4e-view-url-number-face :foreground ,minimal-mistakes-purple)
|
||||
(mu4e-highlight-face :background ,minimal-mistakes-bg
|
||||
:foreground ,minimal-mistakes-yellow
|
||||
:extend t)
|
||||
(mu4e-header-highlight-face :background ,minimal-mistakes-current
|
||||
:foreground ,minimal-mistakes-fg
|
||||
:underline nil :weight bold
|
||||
:extend t)
|
||||
(mu4e-header-key-face :inherit message-mml)
|
||||
(mu4e-header-marks-face :foreground ,minimal-mistakes-purple)
|
||||
(mu4e-cited-1-face :foreground ,minimal-mistakes-purple)
|
||||
(mu4e-cited-2-face :foreground ,minimal-mistakes-orange)
|
||||
(mu4e-cited-3-face :foreground ,minimal-mistakes-comment)
|
||||
(mu4e-cited-4-face :foreground ,fg2)
|
||||
(mu4e-cited-5-face :foreground ,fg3)
|
||||
;; neotree
|
||||
(neo-banner-face :foreground ,minimal-mistakes-orange :weight bold)
|
||||
;;(neo-button-face :underline nil)
|
||||
(neo-dir-link-face :foreground ,minimal-mistakes-purple)
|
||||
(neo-expand-btn-face :foreground ,minimal-mistakes-fg)
|
||||
(neo-file-link-face :foreground ,minimal-mistakes-cyan)
|
||||
(neo-header-face :background ,minimal-mistakes-bg
|
||||
:foreground ,minimal-mistakes-fg
|
||||
:weight bold)
|
||||
(neo-root-dir-face :foreground ,minimal-mistakes-purple :weight bold)
|
||||
(neo-vc-added-face :foreground ,minimal-mistakes-orange)
|
||||
(neo-vc-conflict-face :foreground ,minimal-mistakes-red)
|
||||
(neo-vc-default-face :inherit neo-file-link-face)
|
||||
(neo-vc-edited-face :foreground ,minimal-mistakes-orange)
|
||||
(neo-vc-ignored-face :foreground ,minimal-mistakes-comment)
|
||||
(neo-vc-missing-face :foreground ,minimal-mistakes-red)
|
||||
(neo-vc-needs-merge-face :foreground ,minimal-mistakes-red
|
||||
:weight bold)
|
||||
;;(neo-vc-needs-update-face :underline t)
|
||||
;;(neo-vc-removed-face :strike-through t)
|
||||
(neo-vc-unlocked-changes-face :foreground ,minimal-mistakes-red)
|
||||
;;(neo-vc-unregistered-face nil)
|
||||
(neo-vc-up-to-date-face :foreground ,minimal-mistakes-green)
|
||||
(neo-vc-user-face :foreground ,minimal-mistakes-purple)
|
||||
;; org
|
||||
(org-agenda-date :foreground ,minimal-mistakes-cyan :underline nil)
|
||||
(org-agenda-dimmed-todo-face :foreground ,minimal-mistakes-comment)
|
||||
(org-agenda-done :foreground ,minimal-mistakes-green)
|
||||
(org-agenda-structure :foreground ,minimal-mistakes-purple)
|
||||
(org-block :foreground ,minimal-mistakes-orange)
|
||||
(org-code :foreground ,minimal-mistakes-green)
|
||||
(org-column :background ,bg4)
|
||||
(org-column-title :inherit org-column :weight bold :underline t)
|
||||
(org-date :foreground ,minimal-mistakes-cyan :underline t)
|
||||
(org-document-info :foreground ,other-blue)
|
||||
(org-document-info-keyword :foreground ,minimal-mistakes-comment)
|
||||
(org-document-title :weight bold :foreground ,minimal-mistakes-orange
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-doc-title)))
|
||||
(org-done :foreground ,minimal-mistakes-green)
|
||||
(org-ellipsis :foreground ,minimal-mistakes-comment)
|
||||
(org-footnote :foreground ,other-blue)
|
||||
(org-formula :foreground ,minimal-mistakes-pink)
|
||||
(org-headline-done :foreground ,minimal-mistakes-comment
|
||||
:weight normal :strike-through t)
|
||||
(org-hide :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-bg)
|
||||
(org-level-1 :inherit bold :foreground ,minimal-mistakes-pink
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-1)))
|
||||
(org-level-2 :inherit bold :foreground ,minimal-mistakes-purple
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-2)))
|
||||
(org-level-3 :weight normal :foreground ,minimal-mistakes-green
|
||||
,@(when minimal-mistakes-enlarge-headings
|
||||
(list :height minimal-mistakes-height-title-3)))
|
||||
(org-level-4 :weight normal :foreground ,minimal-mistakes-yellow)
|
||||
(org-level-5 :weight normal :foreground ,minimal-mistakes-cyan)
|
||||
(org-level-6 :weight normal :foreground ,minimal-mistakes-orange)
|
||||
(org-level-7 :weight normal :foreground ,other-blue)
|
||||
(org-level-8 :weight normal :foreground ,minimal-mistakes-fg)
|
||||
(org-link :foreground ,minimal-mistakes-cyan :underline t)
|
||||
(org-priority :foreground ,minimal-mistakes-cyan)
|
||||
(org-quote :foreground ,minimal-mistakes-yellow :slant italic)
|
||||
(org-scheduled :foreground ,minimal-mistakes-green)
|
||||
(org-scheduled-previously :foreground ,minimal-mistakes-yellow)
|
||||
(org-scheduled-today :foreground ,minimal-mistakes-green)
|
||||
(org-sexp-date :foreground ,fg4)
|
||||
(org-special-keyword :foreground ,minimal-mistakes-yellow)
|
||||
(org-table :foreground ,minimal-mistakes-purple)
|
||||
(org-tag :foreground ,minimal-mistakes-pink :weight bold :background ,bg2)
|
||||
(org-todo :foreground ,minimal-mistakes-orange :weight bold :background ,bg2)
|
||||
(org-upcoming-deadline :foreground ,minimal-mistakes-yellow)
|
||||
(org-verbatim :inherit org-quote)
|
||||
(org-warning :weight bold :foreground ,minimal-mistakes-pink)
|
||||
;; outline
|
||||
(outline-1 :foreground ,minimal-mistakes-pink)
|
||||
(outline-2 :foreground ,minimal-mistakes-purple)
|
||||
(outline-3 :foreground ,minimal-mistakes-green)
|
||||
(outline-4 :foreground ,minimal-mistakes-yellow)
|
||||
(outline-5 :foreground ,minimal-mistakes-cyan)
|
||||
(outline-6 :foreground ,minimal-mistakes-orange)
|
||||
;; perspective
|
||||
(persp-selected-face :weight bold :foreground ,minimal-mistakes-pink)
|
||||
;; powerline
|
||||
(powerline-active1 :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-pink)
|
||||
(powerline-active2 :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-pink)
|
||||
(powerline-inactive1 :background ,bg2 :foreground ,minimal-mistakes-purple)
|
||||
(powerline-inactive2 :background ,bg2 :foreground ,minimal-mistakes-purple)
|
||||
(powerline-evil-base-face :foreground ,bg2)
|
||||
(powerline-evil-emacs-face :inherit powerline-evil-base-face :background ,minimal-mistakes-yellow)
|
||||
(powerline-evil-insert-face :inherit powerline-evil-base-face :background ,minimal-mistakes-cyan)
|
||||
(powerline-evil-motion-face :inherit powerline-evil-base-face :background ,minimal-mistakes-purple)
|
||||
(powerline-evil-normal-face :inherit powerline-evil-base-face :background ,minimal-mistakes-green)
|
||||
(powerline-evil-operator-face :inherit powerline-evil-base-face :background ,minimal-mistakes-pink)
|
||||
(powerline-evil-replace-face :inherit powerline-evil-base-face :background ,minimal-mistakes-red)
|
||||
(powerline-evil-visual-face :inherit powerline-evil-base-face :background ,minimal-mistakes-orange)
|
||||
;; rainbow-delimiters
|
||||
(rainbow-delimiters-depth-1-face :foreground ,minimal-mistakes-fg)
|
||||
(rainbow-delimiters-depth-2-face :foreground ,minimal-mistakes-cyan)
|
||||
(rainbow-delimiters-depth-3-face :foreground ,minimal-mistakes-purple)
|
||||
(rainbow-delimiters-depth-4-face :foreground ,minimal-mistakes-pink)
|
||||
(rainbow-delimiters-depth-5-face :foreground ,minimal-mistakes-orange)
|
||||
(rainbow-delimiters-depth-6-face :foreground ,minimal-mistakes-green)
|
||||
(rainbow-delimiters-depth-7-face :foreground ,minimal-mistakes-yellow)
|
||||
(rainbow-delimiters-depth-8-face :foreground ,other-blue)
|
||||
(rainbow-delimiters-unmatched-face :foreground ,minimal-mistakes-orange)
|
||||
;; rpm-spec
|
||||
(rpm-spec-dir-face :foreground ,minimal-mistakes-green)
|
||||
(rpm-spec-doc-face :foreground ,minimal-mistakes-pink)
|
||||
(rpm-spec-ghost-face :foreground ,minimal-mistakes-purple)
|
||||
(rpm-spec-macro-face :foreground ,minimal-mistakes-yellow)
|
||||
(rpm-spec-obsolete-tag-face :inherit font-lock-warning-face)
|
||||
(rpm-spec-package-face :foreground ,minimal-mistakes-purple)
|
||||
(rpm-spec-section-face :foreground ,minimal-mistakes-yellow)
|
||||
(rpm-spec-tag-face :foreground ,minimal-mistakes-cyan)
|
||||
(rpm-spec-var-face :foreground ,minimal-mistakes-orange)
|
||||
;; rst (reStructuredText)
|
||||
(rst-level-1 :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(rst-level-2 :foreground ,minimal-mistakes-purple :weight bold)
|
||||
(rst-level-3 :foreground ,minimal-mistakes-green)
|
||||
(rst-level-4 :foreground ,minimal-mistakes-yellow)
|
||||
(rst-level-5 :foreground ,minimal-mistakes-cyan)
|
||||
(rst-level-6 :foreground ,minimal-mistakes-orange)
|
||||
(rst-level-7 :foreground ,other-blue)
|
||||
(rst-level-8 :foreground ,minimal-mistakes-fg)
|
||||
;; selectrum-mode
|
||||
(selectrum-current-candidate :weight bold)
|
||||
(selectrum-primary-highlight :foreground ,minimal-mistakes-pink)
|
||||
(selectrum-secondary-highlight :foreground ,minimal-mistakes-green)
|
||||
;; show-paren
|
||||
(show-paren-match-face :background unspecified
|
||||
:foreground ,minimal-mistakes-cyan
|
||||
:weight bold)
|
||||
(show-paren-match :background unspecified
|
||||
:foreground ,minimal-mistakes-cyan
|
||||
:weight bold)
|
||||
(show-paren-match-expression :inherit match)
|
||||
(show-paren-mismatch :inherit font-lock-warning-face)
|
||||
;; slime
|
||||
(slime-repl-inputed-output-face :foreground ,minimal-mistakes-purple)
|
||||
;; spam
|
||||
(spam :inherit gnus-summary-normal-read :foreground ,minimal-mistakes-orange
|
||||
:strike-through t :slant oblique)
|
||||
;; speedbar (and sr-speedbar)
|
||||
(speedbar-button-face :foreground ,minimal-mistakes-green)
|
||||
(speedbar-file-face :foreground ,minimal-mistakes-cyan)
|
||||
(speedbar-directory-face :foreground ,minimal-mistakes-purple)
|
||||
(speedbar-tag-face :foreground ,minimal-mistakes-yellow)
|
||||
(speedbar-selected-face :foreground ,minimal-mistakes-pink)
|
||||
(speedbar-highlight-face :inherit match)
|
||||
(speedbar-separator-face :background ,minimal-mistakes-bg
|
||||
:foreground ,minimal-mistakes-fg
|
||||
:weight bold)
|
||||
;; tab-bar & tab-line (since Emacs 27.1)
|
||||
(tab-bar :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-current
|
||||
:inherit variable-pitch)
|
||||
(tab-bar-tab :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-bg
|
||||
:box (:line-width 2 :color ,minimal-mistakes-bg :style nil))
|
||||
(tab-bar-tab-inactive :foreground ,minimal-mistakes-purple :background ,bg2
|
||||
:box (:line-width 2 :color ,bg2 :style nil))
|
||||
(tab-line :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-current
|
||||
:height 0.9 :inherit variable-pitch)
|
||||
(tab-line-tab :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-bg
|
||||
:box (:line-width 2 :color ,minimal-mistakes-bg :style nil))
|
||||
(tab-line-tab-inactive :foreground ,minimal-mistakes-purple :background ,bg2
|
||||
:box (:line-width 2 :color ,bg2 :style nil))
|
||||
(tab-line-tab-current :inherit tab-line-tab)
|
||||
(tab-line-close-highlight :foreground ,minimal-mistakes-red)
|
||||
;; telephone-line
|
||||
(telephone-line-accent-active :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-pink)
|
||||
(telephone-line-accent-inactive :background ,bg2 :foreground ,minimal-mistakes-purple)
|
||||
(telephone-line-unimportant :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-comment)
|
||||
;; term
|
||||
(term :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-bg)
|
||||
(term-color-black :foreground ,minimal-mistakes-bg :background ,minimal-mistakes-comment)
|
||||
(term-color-blue :foreground ,minimal-mistakes-purple :background ,minimal-mistakes-purple)
|
||||
(term-color-cyan :foreground ,minimal-mistakes-cyan :background ,minimal-mistakes-cyan)
|
||||
(term-color-green :foreground ,minimal-mistakes-green :background ,minimal-mistakes-green)
|
||||
(term-color-magenta :foreground ,minimal-mistakes-pink :background ,minimal-mistakes-pink)
|
||||
(term-color-red :foreground ,minimal-mistakes-red :background ,minimal-mistakes-red)
|
||||
(term-color-white :foreground ,minimal-mistakes-fg :background ,minimal-mistakes-fg)
|
||||
(term-color-yellow :foreground ,minimal-mistakes-yellow :background ,minimal-mistakes-yellow)
|
||||
;; 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 ,minimal-mistakes-pink)
|
||||
(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 ,minimal-mistakes-pink)
|
||||
(tree-sitter-hl-face:punctuation.bracket :foreground ,minimal-mistakes-fg)
|
||||
(tree-sitter-hl-face:punctuation.delimiter :foreground ,minimal-mistakes-fg)
|
||||
(tree-sitter-hl-face:punctuation.special :foreground ,minimal-mistakes-pink)
|
||||
(tree-sitter-hl-face:string :inherit font-lock-string-face)
|
||||
(tree-sitter-hl-face:string.special :foreground ,minimal-mistakes-red)
|
||||
(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 ,minimal-mistakes-pink)
|
||||
(tree-sitter-hl-face:variable :inherit font-lock-variable-name-face)
|
||||
(tree-sitter-hl-face:variable.parameter :inherit tree-sitter-hl-face:variable
|
||||
:weight normal)
|
||||
;; undo-tree
|
||||
(undo-tree-visualizer-current-face :foreground ,minimal-mistakes-orange)
|
||||
(undo-tree-visualizer-default-face :foreground ,fg2)
|
||||
(undo-tree-visualizer-register-face :foreground ,minimal-mistakes-purple)
|
||||
(undo-tree-visualizer-unmodified-face :foreground ,minimal-mistakes-fg)
|
||||
;; 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 ,minimal-mistakes-purple)
|
||||
(web-mode-html-attr-value-face :foreground ,minimal-mistakes-green)
|
||||
(web-mode-html-tag-face :foreground ,minimal-mistakes-pink :weight bold)
|
||||
(web-mode-keyword-face :foreground ,minimal-mistakes-pink)
|
||||
(web-mode-string-face :foreground ,minimal-mistakes-yellow)
|
||||
(web-mode-type-face :inherit font-lock-type-face)
|
||||
(web-mode-warning-face :inherit font-lock-warning-face)
|
||||
;; 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 ,minimal-mistakes-green)
|
||||
;; whitespace
|
||||
(whitespace-big-indent :background ,minimal-mistakes-red :foreground ,minimal-mistakes-red)
|
||||
(whitespace-empty :background ,minimal-mistakes-orange :foreground ,minimal-mistakes-red)
|
||||
(whitespace-hspace :background ,bg3 :foreground ,minimal-mistakes-comment)
|
||||
(whitespace-indentation :background ,minimal-mistakes-orange :foreground ,minimal-mistakes-red)
|
||||
(whitespace-line :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-pink)
|
||||
(whitespace-newline :foreground ,minimal-mistakes-comment)
|
||||
(whitespace-space :background ,minimal-mistakes-bg :foreground ,minimal-mistakes-comment)
|
||||
(whitespace-space-after-tab :background ,minimal-mistakes-orange :foreground ,minimal-mistakes-red)
|
||||
(whitespace-space-before-tab :background ,minimal-mistakes-orange :foreground ,minimal-mistakes-red)
|
||||
(whitespace-tab :background ,bg2 :foreground ,minimal-mistakes-comment)
|
||||
(whitespace-trailing :inherit trailing-whitespace)
|
||||
;; yard-mode
|
||||
(yard-tag-face :inherit font-lock-builtin-face)
|
||||
(yard-directive-face :inherit font-lock-builtin-face))))
|
||||
|
||||
(apply #'custom-theme-set-faces
|
||||
'minimal-mistakes
|
||||
(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))
|
||||
(((min-colors 256)) ; terminal withs 256 colors
|
||||
,(if minimal-mistakes-use-24-bit-colors-on-256-colors-terms
|
||||
(funcall expand-with-func 'cadr spec)
|
||||
(funcall expand-with-func 'caddr spec)))
|
||||
(t ; should be only tty-like envs
|
||||
,(funcall expand-with-func 'cadddr spec))))
|
||||
whole-theme))
|
||||
whole-theme))
|
||||
|
||||
(apply #'custom-theme-set-variables
|
||||
'minimal-mistakes
|
||||
(let ((get-func
|
||||
(pcase (display-color-cells)
|
||||
((pred (<= 16777216)) 'car) ; fully graphical envs
|
||||
((pred (<= 256)) 'cadr) ; terminal withs 256 colors
|
||||
(_ 'caddr)))) ; should be only tty-like envs
|
||||
`((ansi-color-names-vector
|
||||
[,(funcall get-func (alist-get 'minimal-mistakes-bg colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-red colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-green colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-yellow colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-comment colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-purple colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-cyan colors))
|
||||
,(funcall get-func (alist-get 'minimal-mistakes-fg 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 'minimal-mistakes)
|
||||
|
||||
;; Local Variables:
|
||||
;; indent-tabs-mode: nil
|
||||
;; End:
|
||||
|
||||
;;; minimal-mistakes-theme.el ends here
|
Loading…
Reference in New Issue
Block a user