init
commit
e6b5e17a39
@ -0,0 +1,6 @@
|
||||
/*
|
||||
!/.gitignore
|
||||
!/init.el
|
||||
!/custom.el
|
||||
!/themes
|
||||
!/config
|
@ -0,0 +1,8 @@
|
||||
(require 'company)
|
||||
|
||||
(setq company-idle-delay 0
|
||||
company-clang-executable "/usr/lib/llvm/11/bin/clang"
|
||||
company-clang-insert-arguments nil
|
||||
company-minimum-prefix-length 1)
|
||||
|
||||
(provide 'config-company)
|
@ -0,0 +1 @@
|
||||
(setq conf-mode-hook (copy-tree text-mode-hook))
|
@ -0,0 +1,5 @@
|
||||
(require 'config-text-mode)
|
||||
|
||||
(load "config-conf-mode-hooks")
|
||||
|
||||
(provide 'config-conf-mode)
|
@ -0,0 +1,54 @@
|
||||
(require 'seq)
|
||||
|
||||
(defvar config-directory (file-name-directory (locate-library "config")))
|
||||
|
||||
(defun config-add-modules-to-load-path (directory)
|
||||
(let* ((pattern (file-name-concat directory "*"))
|
||||
(results (file-expand-wildcards pattern))
|
||||
(directories (seq-filter 'file-directory-p results))
|
||||
(non-hidden (seq-filter (lambda (d)
|
||||
(let ((base (file-name-base d)))
|
||||
(not (string-prefix-p "." base))))
|
||||
directories)))
|
||||
(mapc (lambda (m)
|
||||
(add-to-list 'load-path m))
|
||||
non-hidden)))
|
||||
|
||||
(config-add-modules-to-load-path config-directory)
|
||||
|
||||
(require 'config-dired)
|
||||
(require 'config-display-buffer)
|
||||
(require 'config-eldoc)
|
||||
(require 'config-electric)
|
||||
(require 'config-files)
|
||||
(require 'config-flymake)
|
||||
(require 'config-garbage-collection)
|
||||
(require 'config-keys)
|
||||
(require 'config-man)
|
||||
(require 'config-package)
|
||||
(require 'config-programming-languages)
|
||||
(require 'config-project)
|
||||
(require 'config-recentf)
|
||||
(require 'config-savehist)
|
||||
(require 'config-tramp)
|
||||
|
||||
(require 'config-text-mode)
|
||||
(require 'config-conf-mode)
|
||||
(require 'config-prog-mode)
|
||||
|
||||
(when (locate-library "company")
|
||||
(require 'config-company))
|
||||
|
||||
(when (locate-library "eglot")
|
||||
(require 'config-eglot))
|
||||
|
||||
(when (locate-library "flycheck")
|
||||
(require 'config-flycheck))
|
||||
|
||||
(when (locate-library "lsp-mode")
|
||||
(require 'config-lsp-mode))
|
||||
|
||||
(when (and (>= emacs-major-version 28) (native-comp-available-p))
|
||||
(require 'config-native-comp))
|
||||
|
||||
(provide 'config)
|
@ -0,0 +1,4 @@
|
||||
(setq dired-listing-switches "-alh"
|
||||
dired-kill-when-opening-new-dired-buffer t)
|
||||
|
||||
(provide 'config-dired)
|
@ -0,0 +1,23 @@
|
||||
(defvar config-display-buffer-gaps-width 20)
|
||||
|
||||
(defun config-display-buffer-which-side ()
|
||||
(if (> (+ (frame-pixel-width) config-display-buffer-gaps-width) (/ (x-display-pixel-width) 2))
|
||||
'right
|
||||
'bottom))
|
||||
|
||||
(defun config-display-buffer-update-alist (_)
|
||||
(let ((side (config-display-buffer-which-side)))
|
||||
(setq display-buffer-alist `(("\\*Flymake diagnostics.*"
|
||||
(display-buffer-in-side-window)
|
||||
(side . ,side)
|
||||
(window-height . 15)
|
||||
(window-width . 75)
|
||||
("\*Flycheck errors\*"
|
||||
(display-buffer-in-side-window)
|
||||
(side . ,side)
|
||||
(window-height . 15)
|
||||
(window-width . 75)))))))
|
||||
|
||||
(add-hook 'after-make-frame-functions 'config-display-buffer-update-alist)
|
||||
|
||||
(add-hook 'window-size-change-functions 'config-display-buffer-update-alist)
|
@ -0,0 +1,5 @@
|
||||
(setq display-buffer-base-action '(display-buffer-same-window display-buffer-reuse-window))
|
||||
|
||||
(load "config-display-buffer-alist")
|
||||
|
||||
(provide 'config-display-buffer)
|
@ -0,0 +1,9 @@
|
||||
(defvar config-eglot-server-clangd '((c-mode c++-mode) .
|
||||
("clangd"
|
||||
"--header-insersion=never")))
|
||||
|
||||
(defvar config-eglot-server-rust-analyzer '((rust-mode) .
|
||||
("rust-analyzer")))
|
||||
|
||||
(add-to-list 'eglot-server-programs config-eglot-server-clangd)
|
||||
(add-to-list 'eglot-server-programs config-eglot-server-rust-analyzer)
|
@ -0,0 +1,7 @@
|
||||
(require 'eglot)
|
||||
|
||||
(setq eglot-autoshutdown t)
|
||||
|
||||
(load "config-eglot-servers")
|
||||
|
||||
(provide 'config-eglot)
|
@ -0,0 +1,4 @@
|
||||
(setq eldoc-idle-delay 0
|
||||
eldoc-echo-area-use-multiline-p 5)
|
||||
|
||||
(provide 'config-eldoc)
|
@ -0,0 +1,7 @@
|
||||
(require 'electric)
|
||||
(require 'elec-pair)
|
||||
|
||||
(add-to-list 'electric-pair-pairs '("?(" . "?)"))
|
||||
(add-to-list 'electric-pair-pairs '("?{" . "?}"))
|
||||
|
||||
(provide 'config-electric)
|
@ -0,0 +1,50 @@
|
||||
(defvar config-files-backup-directory (file-name-concat user-emacs-directory "backups"))
|
||||
|
||||
(unless (file-exists-p config-files-backup-directory)
|
||||
(mkdir config-files-backup-directory))
|
||||
|
||||
(defun config-files-format-backup-path (path number)
|
||||
(format "%s.~%s~" path number))
|
||||
|
||||
(defun config-files-backup-extension (path)
|
||||
(let* ((i (string-search "." (reverse path)))
|
||||
(extension (substring path (- (length path) i))))
|
||||
extension))
|
||||
|
||||
(defun config-files-backup-no-extension (path)
|
||||
(let* ((i (string-search "." (reverse path)))
|
||||
(no-extension (substring path 0 (- (length path) (+ i 1)))))
|
||||
no-extension))
|
||||
|
||||
(defun config-files-backup-number (path)
|
||||
(let* ((extension (config-files-backup-extension path))
|
||||
(extracted (substring extension 1 (- (length extension) 1)))
|
||||
(as-number (unless (zerop (length extracted))
|
||||
(string-to-number extracted))))
|
||||
as-number))
|
||||
|
||||
(defun config-files-shift-path (path)
|
||||
(let* ((without-extension (config-files-backup-no-extension path))
|
||||
(number (config-files-backup-number path))
|
||||
(next-number (+ number 1))
|
||||
(shifted-path (config-files-format-backup-path
|
||||
without-extension
|
||||
next-number)))
|
||||
shifted-path))
|
||||
|
||||
(defun config-files-shift-backup (path)
|
||||
(let ((next-path (config-files-shift-path path)))
|
||||
(when (file-exists-p next-path)
|
||||
(config-files-shift-backup next-path))
|
||||
(rename-file path next-path)))
|
||||
|
||||
(defun config-files-backup-before-save ()
|
||||
(unless backup-inhibited
|
||||
(let* ((path (buffer-file-name))
|
||||
(backup-path (config-files-format-backup-path path 0)))
|
||||
(when (file-exists-p path)
|
||||
(when (file-exists-p backup-path)
|
||||
(config-files-shift-backup backup-path))
|
||||
(copy-file path backup-path)))))
|
||||
|
||||
(add-hook 'before-save-hook 'config-files-backup-before-save)
|
@ -0,0 +1,3 @@
|
||||
(load "config-files-backup-on-save-hook")
|
||||
|
||||
(provide 'config-files)
|
@ -0,0 +1,7 @@
|
||||
(defun config-flycheck-rust-cargo-has-command-p (command)
|
||||
(let* ((commands (process-lines "cargo" "--list"))
|
||||
(trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands)))
|
||||
(seq-contains-p (-rest trimmed) command)))
|
||||
|
||||
(advice-add 'flycheck-rust-cargo-has-command-p
|
||||
:override 'config-flycheck-rust-cargo-has-command-p)
|
@ -0,0 +1,7 @@
|
||||
(require 'flycheck)
|
||||
|
||||
(add-hook 'flycheck-error-list-mode-hook (lambda () (visual-line-mode 1)))
|
||||
|
||||
(load "config-flycheck-cargo-has-command-p-fix")
|
||||
|
||||
(provide 'config-flycheck)
|
@ -0,0 +1,2 @@
|
||||
(add-hook 'flymake-diagnostics-buffer-mode-hook (lambda ()
|
||||
(visual-line-mode 1)))
|
@ -0,0 +1,5 @@
|
||||
(require 'flymake)
|
||||
|
||||
(load "config-flymake-hooks")
|
||||
|
||||
(provide 'config-flymake)
|
@ -0,0 +1,3 @@
|
||||
(setq gc-cons-threshold (* (expt 1024 2) 25))
|
||||
|
||||
(provide 'config-garbage-collection)
|
@ -0,0 +1,11 @@
|
||||
(global-unset-key (kbd "<left>"))
|
||||
(global-unset-key (kbd "<right>"))
|
||||
(global-unset-key (kbd "<up>"))
|
||||
(global-unset-key (kbd "<down>"))
|
||||
(global-unset-key (kbd "<C-left>"))
|
||||
(global-unset-key (kbd "<C-right>"))
|
||||
(global-unset-key (kbd "<C-up>"))
|
||||
(global-unset-key (kbd "<C-down>"))
|
||||
(global-set-key (kbd "C-x k") 'kill-buffer)
|
||||
|
||||
(provide 'config-keys)
|
@ -0,0 +1,40 @@
|
||||
(setq lsp-server-install-dir "/somewhere/that/doesnt/exist")
|
||||
|
||||
(defun config-lsp-mode-disable-install-server-error ()
|
||||
(error "lsp-mode server install features have been disabled"))
|
||||
|
||||
(advice-add 'lsp-install-server
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp-update-server
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp-update-servers
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp-download-install
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp-download-path
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp-async-start-process
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp--download-status
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp--install-server-internal
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
||||
|
||||
(advice-add 'lsp--npm-dependency-install
|
||||
:around
|
||||
'config-lsp-mode-disable-install-server-error)
|
@ -0,0 +1,19 @@
|
||||
(require 'lsp-mode)
|
||||
(require 'flycheck)
|
||||
|
||||
(setq lsp-enable-dap-auto-configure nil
|
||||
lsp-enable-folding nil
|
||||
lsp-enable-indentation t
|
||||
lsp-enable-on-type-formatting nil
|
||||
lsp-completion-enable nil
|
||||
lsp-enable-snippet nil
|
||||
lsp-modeline-code-actions-enable nil
|
||||
lsp-lens-enable nil
|
||||
lsp-signature-auto-activate nil
|
||||
lsp-eldoc-render-all t
|
||||
lsp-rls-server-command nil
|
||||
lsp-enable-suggest-server-download nil)
|
||||
|
||||
(load "config-lsp-mode-disable-install-server")
|
||||
|
||||
(provide 'config-lsp-mode)
|
@ -0,0 +1,31 @@
|
||||
(defun config-man-pages ()
|
||||
(let* ((manpath (getenv "MANPATH"))
|
||||
(directories (split-string manpath ":" t))
|
||||
(that-exist (seq-filter 'file-exists-p directories))
|
||||
(files (mapcar (lambda (d)
|
||||
(directory-files-recursively d ".*" nil))
|
||||
that-exist))
|
||||
(flattened (flatten-list files))
|
||||
(pages (mapcar 'file-name-nondirectory flattened))
|
||||
(without-second-ext (mapcar (lambda (p)
|
||||
(let ((extension (file-name-extension p)))
|
||||
(if (string-match-p "^[0-9+]$" extension)
|
||||
p
|
||||
(file-name-sans-extension p))))
|
||||
pages)))
|
||||
without-second-ext))
|
||||
|
||||
(defun config-man-locate-page (page)
|
||||
(with-temp-buffer
|
||||
(let ((exit-code (call-process "man" nil (current-buffer) nil "--where" page)))
|
||||
(when exit-code
|
||||
(let* ((output (buffer-string))
|
||||
(trimmed (string-trim-right output "\n")))
|
||||
trimmed)))))
|
||||
|
||||
(defun config-man-advice (orig &rest args)
|
||||
(interactive)
|
||||
(let ((page (or args (list (completing-read "Select page: " (config-man-pages) nil t)))))
|
||||
(apply orig page)))
|
||||
|
||||
(advice-add 'man :around 'config-man-advice)
|
@ -0,0 +1,5 @@
|
||||
(setq Man-notify-method 'pushy)
|
||||
|
||||
(load "config-man-helper-functions")
|
||||
|
||||
(provide 'config-man)
|
@ -0,0 +1,3 @@
|
||||
(setq native-comp-async-jobs-number (string-to-number (shell-command-to-string "nproc")))
|
||||
|
||||
(provide 'config-native-comp)
|
@ -0,0 +1,4 @@
|
||||
(setq package-archives nil
|
||||
package-check-signature 'all)
|
||||
|
||||
(provide 'config-package)
|
@ -0,0 +1 @@
|
||||
(setq prog-mode-hook (copy-tree text-mode-hook))
|
@ -0,0 +1,5 @@
|
||||
(require 'config-text-mode)
|
||||
|
||||
(load "config-prog-mode-hooks")
|
||||
|
||||
(provide 'config-prog-mode)
|
@ -0,0 +1,4 @@
|
||||
(defun config-c-mode-insert-header-guard ()
|
||||
(interactive)
|
||||
(let ((guard (upcase (format "%s_H" (file-name-base (buffer-file-name))))))
|
||||
(insert (format "#ifndef %s\n#define %s\n#endif" guard guard))))
|
@ -0,0 +1,5 @@
|
||||
(setq c-default-style "stroustrup" c-basic-offset 4)
|
||||
|
||||
(load "config-c-functions")
|
||||
|
||||
(provide 'config-c)
|
@ -0,0 +1,14 @@
|
||||
(defvar config-programming-languages-directory (file-name-directory
|
||||
(locate-library "config-programming-languages")))
|
||||
|
||||
(defvar config-programming-languages-modules '(c shell))
|
||||
|
||||
(mapc (lambda (module)
|
||||
(let ((module-load-path (file-name-concat config-programming-languages-directory (symbol-name module))))
|
||||
(add-to-list 'load-path module-load-path)))
|
||||
config-programming-languages-modules)
|
||||
|
||||
(require 'config-c)
|
||||
(require 'config-shell)
|
||||
|
||||
(provide 'config-programming-languages)
|
@ -0,0 +1,3 @@
|
||||
(setq sh-shell-file "/bin/bash")
|
||||
|
||||
(provide 'config-shell)
|
@ -0,0 +1,4 @@
|
||||
(add-to-list 'project-find-functions (lambda (directory)
|
||||
(let ((rust-project (locate-dominating-file directory "Cargo.toml")))
|
||||
(when rust-project
|
||||
(cons 'transient rust-project)))))
|
@ -0,0 +1,3 @@
|
||||
(load "config-project-find-rust-projects")
|
||||
|
||||
(provide 'config-project)
|
@ -0,0 +1,4 @@
|
||||
(setq recentf-max-menu-items 25
|
||||
recentf-max-saved-items 25)
|
||||
|
||||
(provide 'config-recentf)
|
@ -0,0 +1,11 @@
|
||||
(require 'savehist)
|
||||
|
||||
(setq savehist-file (expand-file-name "savehist" user-emacs-directory)
|
||||
savehist-save-minibuffer-history t)
|
||||
|
||||
(add-to-list 'savehist-additional-variables 'command-history)
|
||||
|
||||
(unless (file-exists-p savehist-file)
|
||||
(make-empty-file savehist-file))
|
||||
|
||||
(provide 'config-savehist)
|
@ -0,0 +1,9 @@
|
||||
(add-hook 'text-mode-hook (lambda ()
|
||||
(display-line-numbers-mode 1)
|
||||
(visual-line-mode 1)
|
||||
(display-fill-column-indicator-mode 1)
|
||||
(electric-pair-mode 1)
|
||||
(electric-indent-mode 1)
|
||||
(setq-local display-fill-column-indicator-column 120)
|
||||
(when (require 'highlight-indentation nil t)
|
||||
(highlight-indentation-mode 1))))
|
@ -0,0 +1,3 @@
|
||||
(load "config-text-mode-hooks")
|
||||
|
||||
(provide 'config-text-mode)
|
@ -0,0 +1,2 @@
|
||||
(add-to-list 'tramp-connection-properties (list (regexp-quote (format "/sudo:root@%s:" system-name))
|
||||
"session-timeout" (* 60 20)))
|
@ -0,0 +1,3 @@
|
||||
(defun sudo-edit ()
|
||||
(interactive)
|
||||
(find-file (format "/sudo:root@%s:%s" system-name (read-file-name "Edit as root: "))))
|
@ -0,0 +1,10 @@
|
||||
(require 'tramp)
|
||||
|
||||
(setq password-cache nil
|
||||
password-cache-expiry 0
|
||||
tramp-persistency-file-name nil)
|
||||
|
||||
(load "config-tramp-connection-properties")
|
||||
(load "config-tramp-sudo-hang-fix")
|
||||
|
||||
(provide 'config-tramp)
|
@ -0,0 +1,22 @@
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(safe-local-variable-values
|
||||
'((rust-rustfmt-switches "--edition" "2021")
|
||||
(projectile-package-compilation-cmd . "/home/notroot/bin/cargo-wrapper build")
|
||||
(projectile-package-test-cmd . "/home/notroot/bin/cargo-wrapper test")
|
||||
(projectile-package-compilation-cmd . "nonet cargo build")
|
||||
(projectile-package-test-cmd . "nonet cargo test")
|
||||
(projectile-package-cmd . "nonet cargo test")
|
||||
(eval lsp)
|
||||
(eval eglot-ensure)))
|
||||
'(warning-suppress-types '((comp))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(default ((t (:family "Noto Sans Mono" :foundry "GOOG" :slant normal :weight normal :height 98 :width normal))))
|
||||
'(flymake-error ((t (:underline nil)))))
|
@ -0,0 +1,35 @@
|
||||
(add-to-list 'load-path (file-name-concat user-emacs-directory "config"))
|
||||
|
||||
(require 'config)
|
||||
|
||||
(setq auth-source-save-behavior nil
|
||||
auto-save-default nil
|
||||
change-major-mode-with-file-name nil
|
||||
custom-buffer-indent 4
|
||||
custom-file (file-name-concat user-emacs-directory "custom.el")
|
||||
custom-theme-directory (file-name-concat user-emacs-directory "themes/")
|
||||
inhibit-splash-screen t
|
||||
make-backup-files nil
|
||||
tab-width 4)
|
||||
|
||||
(setq-default display-fill-column-indicator-column 120
|
||||
mode-line-format (list "%b (%m)")
|
||||
indent-tabs-mode nil)
|
||||
|
||||
(when (file-exists-p (file-name-concat custom-theme-directory "custom-wombat-theme.el"))
|
||||
(load-theme 'custom-wombat t))
|
||||
|
||||
(when (file-exists-p custom-file)
|
||||
(load custom-file))
|
||||
|
||||
(cua-mode 1)
|
||||
(recentf-mode 1)
|
||||
(savehist-mode 1)
|
||||
(save-place-mode 1)
|
||||
(show-paren-mode 1)
|
||||
(pixel-scroll-mode 1)
|
||||
(pixel-scroll-precision-mode 1)
|
||||
(menu-bar-mode 0)
|
||||
(scroll-bar-mode 0)
|
||||
(tool-bar-mode 0)
|
||||
(tooltip-mode 0)
|
@ -0,0 +1,120 @@
|
||||
;;; wombat-theme.el --- Custom face theme for Emacs -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Kristoffer Grönlund <krig@koru.se>
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme custom-wombat
|
||||
"Medium-contrast faces with a dark gray background.
|
||||
Adapted, with permission, from a Vim color scheme by Lars H. Nielsen.
|
||||
Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces
|
||||
are included.")
|
||||
|
||||
(let ((class '((class color) (min-colors 89))))
|
||||
(custom-theme-set-faces
|
||||
'custom-wombat
|
||||
`(default ((,class (:background "#242424" :foreground "#f6f3e8"))))
|
||||
`(cursor ((,class (:background "#656565"))))
|
||||
;; Highlighting faces
|
||||
`(fringe ((,class (:background "#242424" :foreground "#f6f3e8"))))
|
||||
`(highlight ((,class (:background "#454545" :foreground "#ffffff"
|
||||
:underline t))))
|
||||
`(region ((,class (:background "#444444"))))
|
||||
`(secondary-selection ((,class (:background "#333366" :foreground "#f6f3e8"))))
|
||||
`(isearch ((,class (:background "#343434" :foreground "#857b6f"))))
|
||||
`(lazy-highlight ((,class (:background "#384048" :foreground "#a0a8b0"))))
|
||||
;; Mode line faces
|
||||
`(mode-line ((,class (:background "#444444" :foreground "#f6f3e8"))))
|
||||
`(mode-line-inactive ((,class (:background "#444444" :foreground "#857b6f"))))
|
||||
;; Escape and prompt faces
|
||||
`(minibuffer-prompt ((,class (:foreground "#e5786d"))))
|
||||
`(escape-glyph ((,class (:foreground "#ddaa6f" :weight bold))))
|
||||
`(homoglyph ((,class (:foreground "#ddaa6f" :weight bold))))
|
||||
;; Font lock faces
|
||||
`(font-lock-builtin-face ((,class (:foreground "#e5786d"))))
|
||||
`(font-lock-comment-face ((,class (:foreground "#99968b"))))
|
||||
`(font-lock-constant-face ((,class (:foreground "#e5786d"))))
|
||||
`(font-lock-function-name-face ((,class (:foreground "#cae682"))))
|
||||
`(font-lock-keyword-face ((,class (:foreground "#8ac6f2" :weight bold))))
|
||||
`(font-lock-string-face ((,class (:foreground "#95e454"))))
|
||||
`(font-lock-type-face ((,class (:foreground "#92a65e" :weight bold))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground "#cae682"))))
|
||||
`(font-lock-warning-face ((,class (:foreground "#ccaa8f"))))
|
||||
;; Help faces
|
||||
`(help-key-binding ((,class (:background "#333333" :foreground "#f6f3e8"))))
|
||||
;; Button and link faces
|
||||
`(link ((,class (:foreground "#8ac6f2" :underline t))))
|
||||
`(link-visited ((,class (:foreground "#e5786d" :underline t))))
|
||||
`(button ((,class (:background "#333333" :foreground "#f6f3e8"))))
|
||||
`(header-line ((,class (:background "#303030" :foreground "#e7f6da"))))
|
||||
;; Gnus faces
|
||||
`(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-group-news-1-low ((,class (:foreground "#95e454"))))
|
||||
`(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-news-2-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f"))))
|
||||
`(gnus-group-news-3-low ((,class (:foreground "#ccaa8f"))))
|
||||
`(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b"))))
|
||||
`(gnus-group-news-4-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-news-5-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-news-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-group-mail-1-low ((,class (:foreground "#95e454"))))
|
||||
`(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-mail-2-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f"))))
|
||||
`(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f"))))
|
||||
`(gnus-group-mail-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-header-content ((,class (:foreground "#8ac6f2"))))
|
||||
`(gnus-header-from ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-header-subject ((,class (:foreground "#cae682"))))
|
||||
`(gnus-header-name ((,class (:foreground "#8ac6f2"))))
|
||||
`(gnus-header-newsgroups ((,class (:foreground "#cae682"))))
|
||||
;; Message faces
|
||||
`(message-header-name ((,class (:foreground "#8ac6f2" :weight bold))))
|
||||
`(message-header-cc ((,class (:foreground "#95e454"))))
|
||||
`(message-header-other ((,class (:foreground "#95e454"))))
|
||||
`(message-header-subject ((,class (:foreground "#cae682"))))
|
||||
`(message-header-to ((,class (:foreground "#cae682"))))
|
||||
`(message-cited-text ((,class (:foreground "#99968b"))))
|
||||
`(message-separator ((,class (:foreground "#e5786d" :weight bold))))
|
||||
;; ANSI colors
|
||||
`(ansi-color-black ((,class (:background "#242424" :foreground "#242424"))))
|
||||
`(ansi-color-red ((,class (:background "#b85149" :foreground "#b85149"))))
|
||||
`(ansi-color-green ((,class (:background "#92a65e" :foreground "#92a65e"))))
|
||||
`(ansi-color-yellow ((,class (:background "#ccaa8f" :foreground "#ccaa8f"))))
|
||||
`(ansi-color-blue ((,class (:background "#5b98c2" :foreground "#5b98c2"))))
|
||||
`(ansi-color-magenta ((,class (:background "#64619a" :foreground "#64619a"))))
|
||||
`(ansi-color-cyan ((,class (:background "#3f9f9e" :foreground "#3f9f9e"))))
|
||||
`(ansi-color-white ((,class (:background "#f6f3e8" :foreground "#f6f3e8"))))
|
||||
`(ansi-color-bright-black ((,class (:background "#444444" :foreground "#444444"))))
|
||||
`(ansi-color-bright-red ((,class (:background "#e5786d" :foreground "#e5786d"))))
|
||||
`(ansi-color-bright-green ((,class (:background "#95e454" :foreground "#95e454"))))
|
||||
`(ansi-color-bright-yellow ((,class (:background "#edc4a3" :foreground "#edc4a3"))))
|
||||
`(ansi-color-bright-blue ((,class (:background "#8ac6f2" :foreground "#8ac6f2"))))
|
||||
`(ansi-color-bright-magenta ((,class (:background "#a6a1de" :foreground "#a6a1de"))))
|
||||
`(ansi-color-bright-cyan ((,class (:background "#70cecc" :foreground "#70cecc"))))
|
||||
`(ansi-color-bright-white ((,class (:background "#ffffff" :foreground "#ffffff"))))))
|
||||
|
||||
(when (require 'highlight-indentation nil t)
|
||||
(set-face-attribute 'highlight-indentation-face nil :background "#303030"))
|
||||
|
||||
(provide-theme 'custom-wombat)
|
@ -0,0 +1,102 @@
|
||||
(deftheme github-dim)
|
||||
|
||||
(defvar github-dim-colors (list (cons 'foreground "#adbac7")
|
||||
(cons 'background "#22272e")
|
||||
(cons 'comment "#768390")
|
||||
(cons 'constant "#6cb6ff")
|
||||
(cons 'function "#dcbdfb")
|
||||
(cons 'keyword "#f47067")
|
||||
(cons 'string "#96d0ff")
|
||||
(cons 'variable "#f69d50")))
|
||||
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
(colors github-dim-colors))
|
||||
(custom-theme-set-faces
|
||||
'github-dim
|
||||
`(default ((,class (:background ,(cdr (assoc 'background colors)) :foreground ,(cdr (assoc 'foreground colors))))))
|
||||
`(cursor ((,class (:background ,(cdr (assoc 'foreground colors))))))
|
||||
;; Highlighting faces
|
||||
`(fringe ((,class (:background ,(cdr (assoc 'background colors)) :foreground ,(cdr (assoc 'foreground colors))))))
|
||||
`(highlight ((,class (:background "#454545" :foreground "#ffffff"
|
||||
:underline t))))
|
||||
`(region ((,class (:background "#444444"))))
|
||||
`(secondary-selection ((,class (:background "#333366" :foreground "#f6f3e8"))))
|
||||
`(isearch ((,class (:background "#343434" :foreground "#857b6f"))))
|
||||
`(lazy-highlight ((,class (:background "#384048" :foreground "#a0a8b0"))))
|
||||
;; Mode line faces
|
||||
`(mode-line ((,class (:background "#444444" :foreground "#f6f3e8"))))
|
||||
`(mode-line-inactive ((,class (:background "#444444" :foreground "#857b6f"))))
|
||||
;; Escape and prompt faces
|
||||
`(minibuffer-prompt ((,class (:foreground "#e5786d"))))
|
||||
`(escape-glyph ((,class (:foreground "#ddaa6f" :weight bold))))
|
||||
`(homoglyph ((,class (:foreground "#ddaa6f" :weight bold))))
|
||||
;; Font lock faces
|
||||
`(font-lock-builtin-face ((,class (:foreground ,(cdr (assoc 'keyword colors))))))
|
||||
`(font-lock-comment-face ((,class (:foreground ,(cdr (assoc 'comment colors))))))
|
||||
`(font-lock-constant-face ((,class (:foreground ,(cdr (assoc 'constant colors))))))
|
||||
`(font-lock-function-name-face ((,class (:foreground ,(cdr (assoc 'function colors))))))
|
||||
`(font-lock-keyword-face ((,class (:foreground ,(cdr (assoc 'keyword colors)) :weight bold))))
|
||||
`(font-lock-string-face ((,class (:foreground ,(cdr (assoc 'string colors))))))
|
||||
`(font-lock-type-face ((,class (:foreground ,(cdr (assoc 'function colors)) :weight bold))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground ,(cdr (assoc 'variable colors))))))
|
||||
`(font-lock-warning-face ((,class (:foreground "#ccaa8f"))))
|
||||
;; Help faces
|
||||
`(help-key-binding ((,class (:background "#333333" :foreground "#f6f3e8"))))
|
||||
;; Button and link faces
|
||||
`(link ((,class (:foreground "#8ac6f2" :underline t))))
|
||||
`(link-visited ((,class (:foreground "#e5786d" :underline t))))
|
||||
`(button ((,class (:background "#333333" :foreground "#f6f3e8"))))
|
||||
`(header-line ((,class (:background "#303030" :foreground "#e7f6da"))))
|
||||
;; Gnus faces
|
||||
`(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-group-news-1-low ((,class (:foreground "#95e454"))))
|
||||
`(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-news-2-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f"))))
|
||||
`(gnus-group-news-3-low ((,class (:foreground "#ccaa8f"))))
|
||||
`(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b"))))
|
||||
`(gnus-group-news-4-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-news-5-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-news-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-group-mail-1-low ((,class (:foreground "#95e454"))))
|
||||
`(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682"))))
|
||||
`(gnus-group-mail-2-low ((,class (:foreground "#cae682"))))
|
||||
`(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f"))))
|
||||
`(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f"))))
|
||||
`(gnus-group-mail-low ((,class (:foreground "#99968b"))))
|
||||
`(gnus-header-content ((,class (:foreground "#8ac6f2"))))
|
||||
`(gnus-header-from ((,class (:weight bold :foreground "#95e454"))))
|
||||
`(gnus-header-subject ((,class (:foreground "#cae682"))))
|
||||
`(gnus-header-name ((,class (:foreground "#8ac6f2"))))
|
||||
`(gnus-header-newsgroups ((,class (:foreground "#cae682"))))
|
||||
;; Message faces
|
||||
`(message-header-name ((,class (:foreground "#8ac6f2" :weight bold))))
|
||||
`(message-header-cc ((,class (:foreground "#95e454"))))
|
||||
`(message-header-other ((,class (:foreground "#95e454"))))
|
||||
`(message-header-subject ((,class (:foreground "#cae682"))))
|
||||
`(message-header-to ((,class (:foreground "#cae682"))))
|
||||
`(message-cited-text ((,class (:foreground "#99968b"))))
|
||||
`(message-separator ((,class (:foreground "#e5786d" :weight bold))))
|
||||
;; ANSI colors
|
||||
`(ansi-color-black ((,class (:background "#242424" :foreground "#242424"))))
|
||||
`(ansi-color-red ((,class (:background "#b85149" :foreground "#b85149"))))
|
||||
`(ansi-color-green ((,class (:background "#92a65e" :foreground "#92a65e"))))
|
||||
`(ansi-color-yellow ((,class (:background "#ccaa8f" :foreground "#ccaa8f"))))
|
||||
`(ansi-color-blue ((,class (:background "#5b98c2" :foreground "#5b98c2"))))
|
||||
`(ansi-color-magenta ((,class (:background "#64619a" :foreground "#64619a"))))
|
||||
`(ansi-color-cyan ((,class (:background "#3f9f9e" :foreground "#3f9f9e"))))
|
||||
`(ansi-color-white ((,class (:background "#f6f3e8" :foreground "#f6f3e8"))))
|
||||
`(ansi-color-bright-black ((,class (:background "#444444" :foreground "#444444"))))
|
||||
`(ansi-color-bright-red ((,class (:background "#e5786d" :foreground "#e5786d"))))
|
||||
`(ansi-color-bright-green ((,class (:background "#95e454" :foreground "#95e454"))))
|
||||
`(ansi-color-bright-yellow ((,class (:background "#edc4a3" :foreground "#edc4a3"))))
|
||||
`(ansi-color-bright-blue ((,class (:background "#8ac6f2" :foreground "#8ac6f2"))))
|
||||
`(ansi-color-bright-magenta ((,class (:background "#a6a1de" :foreground "#a6a1de"))))
|
||||
`(ansi-color-bright-cyan ((,class (:background "#70cecc" :foreground "#70cecc"))))
|
||||
`(ansi-color-bright-white ((,class (:background "#ffffff" :foreground "#ffffff"))))))
|
||||
|
||||
(provide-theme 'github-dim)
|
||||
|
||||
;;; wombat-theme.el ends here
|
Loading…
Reference in New Issue