update 'macs
This commit is contained in:
246
.emacs.d/init.el
246
.emacs.d/init.el
@@ -8,6 +8,9 @@
|
||||
(let ((default-directory "~/.emacs.d/lisp/"))
|
||||
(normal-top-level-add-subdirs-to-load-path))
|
||||
|
||||
(require 'yaml-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
|
||||
(require 'dockerfile-mode)
|
||||
(require 'go-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
|
||||
(require 'jai-mode)
|
||||
@@ -20,20 +23,23 @@
|
||||
(require 's)
|
||||
(require 'dash)
|
||||
(require 'popup)
|
||||
;; ctags for xref, with dumb-jump as fallback
|
||||
(require 'dumb-jump)
|
||||
(setq dumb-jump-force-searcher 'grep)
|
||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
|
||||
(setq xref-show-definitions-function #'xref-show-definitions-completing-read)
|
||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate 100)
|
||||
|
||||
;; undo-tree for persistent undo/redo
|
||||
(require 'queue)
|
||||
(require 'undo-tree)
|
||||
(global-undo-tree-mode)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo-tree-history/")))
|
||||
(setq undo-tree-auto-save-history t)
|
||||
;; vundo for visual undo tree
|
||||
(require 'vundo)
|
||||
(ivy-mode 1)
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq ivy-wrap t)
|
||||
|
||||
;; dired: mouse click opens in same window
|
||||
(add-hook 'dired-mode-hook
|
||||
(lambda ()
|
||||
(define-key dired-mode-map [mouse-2] 'dired-find-file)))
|
||||
|
||||
;; default indentation settings
|
||||
(setq-default indent-tabs-mode t)
|
||||
@@ -73,10 +79,10 @@
|
||||
(setq-default inhibit-startup-screen t)
|
||||
|
||||
;; bottom panel settings (compilation, xref, etc.)
|
||||
(setq compilation-scroll-output t)
|
||||
(setq compilation-scroll-output -1)
|
||||
|
||||
;; bottom panel buffer patterns
|
||||
(defvar my-bottom-panel-buffers '("\\*compilation\\*" "\\*xref\\*" "\\*terminal")
|
||||
(defvar my-bottom-panel-buffers '("\\*compilation\\*" "\\*xref\\*")
|
||||
"List of buffer name patterns for bottom panel.")
|
||||
|
||||
(defun my-bottom-panel-buffer-p (buf)
|
||||
@@ -112,53 +118,6 @@
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("\\*xref\\*" (my-display-in-bottom-panel) (window-height . 0.25)))
|
||||
|
||||
;; tab line for bottom panel
|
||||
(defun my-bottom-panel-tab-line ()
|
||||
"Return tab line tabs for bottom panel buffers."
|
||||
(seq-filter #'my-bottom-panel-buffer-p (buffer-list)))
|
||||
|
||||
(defun my-enable-bottom-panel-tabs ()
|
||||
"Enable tab-line-mode for bottom panel buffers."
|
||||
(setq-local tab-line-tabs-function #'my-bottom-panel-tab-line)
|
||||
(tab-line-mode 1))
|
||||
|
||||
(add-hook 'compilation-mode-hook #'my-enable-bottom-panel-tabs)
|
||||
(add-hook 'xref--xref-buffer-mode-hook #'my-enable-bottom-panel-tabs)
|
||||
(add-hook 'term-mode-hook #'my-enable-bottom-panel-tabs)
|
||||
|
||||
(defvar my-terminal-counter 0 "Counter for terminal instances.")
|
||||
|
||||
(defun my-get-shell ()
|
||||
"Get the shell program for the current platform."
|
||||
(cond ((eq system-type 'darwin) "/bin/zsh")
|
||||
((eq system-type 'gnu/linux) "/bin/bash")
|
||||
((eq system-type 'windows-nt) "powershell")
|
||||
(t "/bin/sh")))
|
||||
|
||||
(defun my-open-terminal ()
|
||||
"Open first terminal in bottom panel, or create one if none exist."
|
||||
(interactive)
|
||||
(let ((existing (seq-find (lambda (buf)
|
||||
(string-match-p "\\*terminal" (buffer-name buf)))
|
||||
(buffer-list))))
|
||||
(if existing
|
||||
(let ((win (my-display-in-bottom-panel existing '((window-height . 0.25)))))
|
||||
(when win (select-window win)))
|
||||
(my-open-terminal-new))))
|
||||
|
||||
(defun my-open-terminal-new ()
|
||||
"Open a new terminal instance in bottom panel."
|
||||
(interactive)
|
||||
(let* ((default-directory (or (and (project-current)
|
||||
(project-root (project-current)))
|
||||
default-directory))
|
||||
(name (format "terminal-%d" (setq my-terminal-counter (1+ my-terminal-counter))))
|
||||
(buf (make-term name (my-get-shell))))
|
||||
(with-current-buffer buf
|
||||
(term-mode)
|
||||
(term-char-mode))
|
||||
(let ((win (my-display-in-bottom-panel buf '((window-height . 0.25)))))
|
||||
(when win (select-window win)))))
|
||||
|
||||
(defun my-bottom-panel-toggle ()
|
||||
"Toggle the bottom panel. Close if visible, open if hidden."
|
||||
@@ -172,28 +131,9 @@
|
||||
my-bottom-panel-buffers))
|
||||
(buffer-list))))
|
||||
(if matching-buffers
|
||||
(let ((win (my-display-in-bottom-panel (car matching-buffers) '((window-height . 0.25)))))
|
||||
(when (and win (string-match-p "\\*terminal" (buffer-name (car matching-buffers))))
|
||||
(select-window win)))
|
||||
(my-display-in-bottom-panel (car matching-buffers) '((window-height . 0.25)))
|
||||
(message "No bottom panel buffers open."))))))
|
||||
|
||||
(defun my-bottom-panel-next ()
|
||||
"Cycle to next bottom panel buffer in bottom window."
|
||||
(interactive)
|
||||
(let* ((matching-buffers (seq-filter
|
||||
(lambda (buf)
|
||||
(seq-some (lambda (pat) (string-match-p pat (buffer-name buf)))
|
||||
my-bottom-panel-buffers))
|
||||
(buffer-list)))
|
||||
(bottom-window (seq-find (lambda (w) (window-at-side-p w 'bottom)) (window-list)))
|
||||
(current (and bottom-window (window-buffer bottom-window)))
|
||||
(idx (and current (seq-position matching-buffers current))))
|
||||
(if (and matching-buffers bottom-window)
|
||||
(let ((next-buf (if idx
|
||||
(nth (mod (1+ idx) (length matching-buffers)) matching-buffers)
|
||||
(car matching-buffers))))
|
||||
(set-window-buffer bottom-window next-buf))
|
||||
(message "No bottom panel buffers open."))))
|
||||
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
||||
(show-paren-mode 1)
|
||||
(delete-selection-mode 1)
|
||||
@@ -203,6 +143,11 @@
|
||||
(menu-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(context-menu-mode -1)
|
||||
(global-set-key [mouse-3] 'ignore)
|
||||
(global-set-key [down-mouse-3] 'ignore)
|
||||
(global-set-key [C-down-mouse-1] 'ignore)
|
||||
(global-set-key [C-down-mouse-3] 'ignore)
|
||||
(global-auto-revert-mode t)
|
||||
(electric-pair-mode -1)
|
||||
(setq ns-pop-up-frames nil)
|
||||
@@ -258,7 +203,7 @@
|
||||
(let ((pid (process-id proc)))
|
||||
(when pid
|
||||
(my-kill-process-tree pid)))
|
||||
(set-process-query-on-exit-flag proc nil)
|
||||
(set-process-query-on-exit-flag proc t)
|
||||
(ignore-errors (delete-process proc))))))
|
||||
|
||||
;; Keybindings / Keybinds
|
||||
@@ -269,18 +214,14 @@
|
||||
(global-set-key (kbd "<f5>") 'my-compile-last)
|
||||
(global-set-key (kbd "<C-S-f5>") 'my-compile-custom)
|
||||
(global-set-key (kbd "<f1>") 'my-bottom-panel-toggle)
|
||||
(global-set-key (kbd "<f2>") 'my-bottom-panel-next)
|
||||
(global-set-key (kbd "C-`") 'my-open-terminal)
|
||||
(global-set-key (kbd "C-~") 'my-open-terminal-new)
|
||||
(global-set-key (kbd "<f6>") 'my-file-manager-command)
|
||||
(global-set-key (kbd "<f7>") 'project-switch-project)
|
||||
(global-set-key (kbd "<C-f6>") 'my-terminal-emulator-command)
|
||||
(global-set-key [f8] 'goto-line)
|
||||
(global-set-key (kbd "C-\\") 'delete-other-windows)
|
||||
(global-set-key (kbd "C-|") 'kill-all-buffers)
|
||||
(global-set-key (kbd "C-\\") 'split-window-below)
|
||||
(global-set-key (kbd "C-|") 'split-window-right)
|
||||
(global-unset-key (kbd "C-x C-SPC"))
|
||||
(global-set-key (kbd "C-x C-SPC") 'rectangle-mark-mode)
|
||||
(global-set-key [C-return] 'save-buffer)
|
||||
(global-set-key [?\C-z] 'undo)
|
||||
(global-set-key (kbd "C-*") 'search-current-word)
|
||||
(global-set-key (kbd "C-/") 'comment-line)
|
||||
@@ -297,36 +238,6 @@
|
||||
(setq mac-command-modifier 'control)
|
||||
(setq mac-control-modifier 'command)
|
||||
|
||||
;; Restore normal cmd/ctrl in terminal buffers on macOS
|
||||
(when (eq system-type 'darwin)
|
||||
(add-hook 'term-mode-hook
|
||||
(lambda ()
|
||||
(setq-local mac-command-modifier 'super)
|
||||
(setq-local mac-control-modifier 'control))))
|
||||
|
||||
;; Enable paste in terminal (Cmd-v on macOS, C-S-v elsewhere)
|
||||
(add-hook 'term-mode-hook
|
||||
(lambda ()
|
||||
(if (eq system-type 'darwin)
|
||||
(define-key term-raw-map (kbd "s-v") 'term-paste)
|
||||
(define-key term-raw-map (kbd "C-S-v") 'term-paste))))
|
||||
|
||||
;; F5 in terminal: Ctrl-C, rebuild, enter, r, enter, c, enter
|
||||
(defun my-term-rebuild ()
|
||||
"Send rebuild sequence to terminal."
|
||||
(interactive)
|
||||
(term-send-raw-string "\C-c")
|
||||
(sit-for 0.1)
|
||||
(term-send-raw-string "rebuild\r")
|
||||
(sit-for 0.1)
|
||||
(term-send-raw-string "r\r")
|
||||
(sit-for 0.1)
|
||||
(term-send-raw-string "c\r"))
|
||||
|
||||
(add-hook 'term-mode-hook
|
||||
(lambda ()
|
||||
(define-key term-raw-map (kbd "<f5>") 'my-term-rebuild)))
|
||||
|
||||
;; Kill terminal buffer when process exits
|
||||
(defun my-term-handle-exit (&optional process-name msg)
|
||||
"Kill terminal buffer when process exits."
|
||||
@@ -354,13 +265,11 @@
|
||||
(define-key isearch-mode-map (kbd "S-<return>") 'isearch-repeat-backward)
|
||||
(define-key isearch-mode-map (kbd "<backspace>") 'isearch-del-char)
|
||||
(define-key isearch-mode-map (kbd "<escape>") 'isearch-exit)
|
||||
(define-key isearch-mode-map (kbd "C-g") 'isearch-exit)
|
||||
(setq isearch-wrap-pause 'no)
|
||||
|
||||
;; multiple cursors (vscode-style)
|
||||
(setq mc/always-run-for-all t)
|
||||
(global-set-key (kbd "C-d") 'mc/mark-next-like-this-word)
|
||||
(global-set-key (kbd "C-S-d") 'mc/mark-previous-like-this-word)
|
||||
(global-set-key (kbd "C-S-a") 'mc/mark-all-like-this)
|
||||
(global-set-key (kbd "C-S-<mouse-1>") 'mc/add-cursor-on-click)
|
||||
(global-set-key (kbd "C-M-<up>") (lambda () (interactive) (mc/mark-previous-lines 1)))
|
||||
(global-set-key (kbd "C-M-<down>") (lambda () (interactive) (mc/mark-next-lines 1)))
|
||||
@@ -407,6 +316,10 @@
|
||||
(define-key map (kbd "C-3") 'switch-to-buffer)
|
||||
(define-key map (kbd "C-4") 'find-file)
|
||||
(define-key map (kbd "C-j") 'dabbrev-expand)
|
||||
;; multiple cursors (override major modes)
|
||||
(define-key map (kbd "C-d") 'mc/mark-next-like-this-word)
|
||||
(define-key map (kbd "C-S-d") 'mc/mark-previous-like-this-word)
|
||||
(define-key map (kbd "C-S-a") 'mc/mark-all-like-this)
|
||||
map)
|
||||
"my-keys-minor-mode keymap.")
|
||||
|
||||
@@ -437,7 +350,9 @@
|
||||
(defun my-project-find-text ()
|
||||
"Search for literal text in project."
|
||||
(interactive)
|
||||
(let ((text (read-string "Search in project: ")))
|
||||
(let* ((initial (when (use-region-p)
|
||||
(buffer-substring-no-properties (region-beginning) (region-end))))
|
||||
(text (read-string "Search in project: " initial)))
|
||||
(project-find-regexp (regexp-quote text))))
|
||||
|
||||
(defun my-project-find-word-at-point ()
|
||||
@@ -499,6 +414,46 @@
|
||||
(compile cmd)
|
||||
(my-compile-custom))))
|
||||
|
||||
;; ctags (persisted per-project)
|
||||
(defun my-tags-get-saved ()
|
||||
"Get saved TAGS file path for current project."
|
||||
(when (project-current)
|
||||
(let ((file (my-project-data-file "tags-file")))
|
||||
(when (file-exists-p file)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(string-trim (buffer-string)))))))
|
||||
|
||||
(defun my-tags-save (tags-path)
|
||||
"Save TAGS file path for current project."
|
||||
(when (project-current)
|
||||
(let ((file (my-project-data-file "tags-file")))
|
||||
(with-temp-file file
|
||||
(insert tags-path)))))
|
||||
|
||||
(defun my-tags-load ()
|
||||
"Load saved TAGS file for current project."
|
||||
(let ((saved (my-tags-get-saved)))
|
||||
(when (and saved (file-exists-p saved))
|
||||
(visit-tags-table saved t))))
|
||||
|
||||
(add-hook 'find-file-hook #'my-tags-load)
|
||||
|
||||
(defun ctags-generate ()
|
||||
"Generate TAGS file using ctags in project root or current directory."
|
||||
(interactive)
|
||||
(let* ((default-directory (or (and (project-current)
|
||||
(project-root (project-current)))
|
||||
default-directory))
|
||||
(tags-path (expand-file-name "TAGS" default-directory)))
|
||||
(message "Generating TAGS in %s..." default-directory)
|
||||
(shell-command "ctags -e -R --exclude=.git --exclude=log *")
|
||||
(my-tags-save tags-path)
|
||||
(visit-tags-table tags-path)
|
||||
(message "TAGS generated and saved: %s" tags-path)))
|
||||
|
||||
(global-set-key (kbd "M-<f12>") 'xref-find-references)
|
||||
|
||||
;; find and replace with modes
|
||||
(defun my-find-replace ()
|
||||
"Find and replace with mode selection: project, file, or selection."
|
||||
@@ -564,7 +519,7 @@
|
||||
|
||||
;; theme selection
|
||||
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
|
||||
(defvar my-current-theme 'bedroom "Currently active theme.")
|
||||
(defvar my-current-theme 'jbeans "Currently active theme.")
|
||||
|
||||
(defun my-select-theme ()
|
||||
"Select and load a theme from all available themes."
|
||||
@@ -601,6 +556,18 @@
|
||||
(global-set-key (kbd "C-<wheel-up>") 'ignore)
|
||||
(global-set-key (kbd "C-<wheel-down>") 'ignore)
|
||||
|
||||
;; reload emacs config
|
||||
(defun reload-emacs-config ()
|
||||
"Reload the Emacs configuration file."
|
||||
(interactive)
|
||||
(load-file "~/.emacs.d/init.el")
|
||||
(message "Emacs config reloaded."))
|
||||
|
||||
(defun edit-emacs-config ()
|
||||
"Open the Emacs configuration file for editing."
|
||||
(interactive)
|
||||
(find-file "~/.emacs.d/init.el"))
|
||||
|
||||
;; test function
|
||||
(defun my-test ()
|
||||
(interactive)
|
||||
@@ -630,14 +597,22 @@
|
||||
(next-line arg))
|
||||
|
||||
;; kill all buffers except current and close other panes
|
||||
(defun kill-all-buffers ()
|
||||
(defun kill-other-buffers ()
|
||||
"Kill all buffers except the current one and close other panes."
|
||||
(interactive)
|
||||
(let ((current (current-buffer)))
|
||||
(mapc (lambda (buf)
|
||||
(unless (eq buf current)
|
||||
(kill-buffer buf)))
|
||||
(buffer-list)))
|
||||
(dolist (buf (buffer-list))
|
||||
(unless (eq buf current)
|
||||
(let ((proc (get-buffer-process buf)))
|
||||
(when proc
|
||||
(let ((pid (process-id proc)))
|
||||
(when pid
|
||||
(my-kill-process-tree pid)))
|
||||
(set-process-query-on-exit-flag proc t))
|
||||
(with-current-buffer buf
|
||||
(set-buffer-modified-p nil))
|
||||
(kill-buffer buf)))))
|
||||
(setq recentf-list nil)
|
||||
(delete-other-windows))
|
||||
|
||||
;; delete word without copying to kill ring
|
||||
@@ -657,6 +632,7 @@ Does not copy to kill ring."
|
||||
|
||||
(global-set-key (kbd "M-<backspace>") 'my-backward-delete-word)
|
||||
(global-set-key (kbd "M-d") 'my-delete-word)
|
||||
(global-set-key (kbd "M-<delete>") 'my-delete-word)
|
||||
(global-set-key (kbd "C-<backspace>") 'my-backward-delete-word)
|
||||
|
||||
;; copy current path with line number
|
||||
@@ -669,25 +645,6 @@ Does not copy to kill ring."
|
||||
(message "Copied: %s" path-with-line))
|
||||
(message "Buffer has no file.")))
|
||||
|
||||
;; scratch buffer with recent projects
|
||||
(defvar my-dashboard-image "~/.emacs.d/logo.jpg"
|
||||
"Path to dashboard image.")
|
||||
|
||||
(defun my-setup-scratch-buffer ()
|
||||
"Setup scratch buffer."
|
||||
(with-current-buffer (get-buffer-create "*scratch*")
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert "\n")
|
||||
;; Image
|
||||
(when (and (display-graphic-p)
|
||||
(file-exists-p (expand-file-name my-dashboard-image)))
|
||||
(insert-image (create-image (expand-file-name my-dashboard-image) nil nil :height 150))
|
||||
(insert "\n\n"))
|
||||
;; Message
|
||||
(insert "Agartha needs your help! You must write a new operating system from scratch to restore Agartha's defences!\n\nYou will need some food, water, and a funny hat to complete this mission!\n")
|
||||
(goto-char (point-min)))))
|
||||
|
||||
;; select rectangle with shift+mouse
|
||||
(defun my-mouse-start-rectangle (start-event)
|
||||
(interactive "e")
|
||||
@@ -780,7 +737,4 @@ Use in `isearch-mode-end-hook'."
|
||||
;; (set-face-attribute 'default nil :font "Consolas-15")
|
||||
|
||||
(global-font-lock-mode 1)
|
||||
(load-theme 'bedroom t)
|
||||
|
||||
;; setup scratch buffer with recent projects on startup
|
||||
(add-hook 'emacs-startup-hook 'my-setup-scratch-buffer)
|
||||
(load-theme 'jbeans t)
|
||||
|
||||
309
.emacs.d/lisp/dockerfile-mode.el
Normal file
309
.emacs.d/lisp/dockerfile-mode.el
Normal file
@@ -0,0 +1,309 @@
|
||||
;;; dockerfile-mode.el --- Major mode for editing Docker's Dockerfiles -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (c) 2013 Spotify AB
|
||||
;; Package-Requires: ((emacs "24"))
|
||||
;; Homepage: https://github.com/spotify/dockerfile-mode
|
||||
;; URL: https://github.com/spotify/dockerfile-mode
|
||||
;; Version: 1.9
|
||||
;; Keywords: docker languages processes tools
|
||||
;;
|
||||
;; Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
;; use this file except in compliance with the License. You may obtain a copy of
|
||||
;; the License at
|
||||
;;
|
||||
;; http://www.apache.org/licenses/LICENSE-2.0
|
||||
;;
|
||||
;; Unless required by applicable law or agreed to in writing, software
|
||||
;; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
;; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
;; License for the specific language governing permissions and limitations under
|
||||
;; the License.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Provides a major mode `dockerfile-mode' for use with the standard
|
||||
;; `Dockerfile' file format. Additional convenience functions allow
|
||||
;; images to be built easily.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'sh-script)
|
||||
(require 'rx)
|
||||
|
||||
|
||||
(declare-function cygwin-convert-file-name-to-windows "cygw32.c" (file &optional absolute-p))
|
||||
|
||||
(defgroup dockerfile nil
|
||||
"Dockerfile editing commands for Emacs."
|
||||
:link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
|
||||
:prefix "dockerfile-"
|
||||
:group 'languages)
|
||||
|
||||
(defcustom dockerfile-mode-command "docker"
|
||||
"Which binary to use to build images."
|
||||
:group 'dockerfile
|
||||
:type 'string)
|
||||
|
||||
(defcustom dockerfile-use-sudo nil
|
||||
"Runs docker builder command with sudo."
|
||||
:type 'boolean
|
||||
:group 'dockerfile)
|
||||
|
||||
(defcustom dockerfile-build-force-rm nil
|
||||
"Runs docker builder command with --force-rm switch."
|
||||
:type 'boolean
|
||||
:group 'dockerfile)
|
||||
|
||||
(defcustom dockerfile-build-pull nil
|
||||
"Runs docker builder command with --pull switch."
|
||||
:type 'boolean
|
||||
:group 'dockerfile)
|
||||
|
||||
(defcustom dockerfile-build-args nil
|
||||
"List of --build-arg to pass to docker build.
|
||||
|
||||
Each element of the list will be passed as a separate
|
||||
--build-arg to the docker build command."
|
||||
:type '(repeat string)
|
||||
:group 'dockerfile)
|
||||
|
||||
(defcustom dockerfile-build-progress "auto"
|
||||
"Type of --progress output (auto, plain, tty) of docker build."
|
||||
:group 'dockerfile
|
||||
:type 'string)
|
||||
|
||||
(defcustom dockerfile-build-extra-options nil
|
||||
"Extra command-line options to send to docker build.
|
||||
|
||||
Use this variable to add custom command-line switches not covered by
|
||||
existing dockerfile-build-* variables.
|
||||
|
||||
Example:
|
||||
(setq-default dockerfile-build-extra-options \"--network host\")"
|
||||
:group 'dockerfile
|
||||
:type 'string)
|
||||
|
||||
(defcustom dockerfile-use-buildkit nil
|
||||
"Use Docker buildkit for building images?
|
||||
|
||||
This is the new buildsystem for docker, and in time it will replace the old one
|
||||
but for now it has to be explicitly enabled to work.
|
||||
It is supported from docker 18.09"
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom dockerfile-enable-auto-indent t
|
||||
"Toggles the auto indentation functionality."
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom dockerfile-indent-offset (or standard-indent 2)
|
||||
"Dockerfile number of columns for margin-changing functions to indent."
|
||||
:type 'integer
|
||||
:safe #'integerp
|
||||
:group 'dockerfile)
|
||||
|
||||
(defface dockerfile-image-name
|
||||
'((t (:inherit (font-lock-type-face bold))))
|
||||
"Face to highlight the base image name after FROM instruction.")
|
||||
|
||||
(defface dockerfile-image-alias
|
||||
'((t (:inherit (font-lock-constant-face bold))))
|
||||
"Face to highlight the base image alias inf FROM ... AS <alias> construct.")
|
||||
|
||||
(defconst dockerfile--from-regex
|
||||
(rx line-start (* blank) "from" (+ blank)
|
||||
(? "--platform=" (+ (not (any blank "\n"))) (+ blank))
|
||||
(group (+ (not (any blank "\n"))))
|
||||
(* blank)
|
||||
(? "as" (+ blank) (group (+ (not (any blank "\n")))))
|
||||
(* blank)
|
||||
(? "#" (* nonl))
|
||||
line-end))
|
||||
|
||||
(defvar dockerfile-font-lock-keywords
|
||||
`(,(cons (rx (or line-start "onbuild ")
|
||||
(group (or "from" "maintainer" "run" "cmd" "expose" "env" "arg"
|
||||
"add" "copy" "entrypoint" "volume" "user" "workdir" "onbuild"
|
||||
"label" "stopsignal" "shell" "healthcheck"))
|
||||
word-boundary)
|
||||
'font-lock-keyword-face)
|
||||
(,dockerfile--from-regex
|
||||
(1 'dockerfile-image-name)
|
||||
(2 'dockerfile-image-alias nil t))
|
||||
,@(sh-font-lock-keywords)
|
||||
,@(sh-font-lock-keywords-2)
|
||||
,@(sh-font-lock-keywords-1))
|
||||
"Default `font-lock-keywords' for `dockerfile mode'.")
|
||||
|
||||
(defvar dockerfile-mode-map
|
||||
(let ((map (make-sparse-keymap))
|
||||
(menu-map (make-sparse-keymap)))
|
||||
(define-key map "\C-c\C-b" #'dockerfile-build-buffer)
|
||||
(define-key map "\C-c\M-b" #'dockerfile-build-no-cache-buffer)
|
||||
(define-key map "\C-c\C-c" #'comment-region)
|
||||
(define-key map [menu-bar dockerfile-mode] (cons "Dockerfile" menu-map))
|
||||
(define-key menu-map [dfc]
|
||||
'(menu-item "Comment Region" comment-region
|
||||
:help "Comment Region"))
|
||||
(define-key-after menu-map [dfb]
|
||||
'(menu-item "Build" dockerfile-build-buffer
|
||||
:help "Send the Dockerfile to docker build"))
|
||||
(define-key-after menu-map [dfbnc]
|
||||
'(menu-item "Build without cache" dockerfile-build-no-cache-buffer
|
||||
:help "Send the Dockerfile to docker build without cache"))
|
||||
map))
|
||||
|
||||
(defvar dockerfile-mode-syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
(modify-syntax-entry ?# "<" table)
|
||||
(modify-syntax-entry ?\n ">" table)
|
||||
(modify-syntax-entry ?' "\"" table)
|
||||
(modify-syntax-entry ?= "." table)
|
||||
table)
|
||||
"Syntax table for `dockerfile-mode'.")
|
||||
|
||||
(define-abbrev-table 'dockerfile-mode-abbrev-table nil
|
||||
"Abbrev table used while in `dockerfile-mode'.")
|
||||
|
||||
(unless dockerfile-mode-abbrev-table
|
||||
(define-abbrev-table 'dockerfile-mode-abbrev-table ()))
|
||||
|
||||
(defun dockerfile-indent-line-function ()
|
||||
"Indent lines in a Dockerfile.
|
||||
|
||||
Lines beginning with a keyword are ignored, and any others are
|
||||
indented by one `dockerfile-indent-offset'. Functionality toggled
|
||||
by `dockerfile-enable-auto-indent'."
|
||||
(when dockerfile-enable-auto-indent
|
||||
(unless (member (get-text-property (line-beginning-position) 'face)
|
||||
'(font-lock-comment-delimiter-face font-lock-keyword-face))
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(unless (looking-at-p "\\s-*$") ; Ignore empty lines.
|
||||
(indent-line-to dockerfile-indent-offset))))))
|
||||
|
||||
(defun dockerfile-build-arg-string ()
|
||||
"Create a --build-arg string for each element in `dockerfile-build-args'."
|
||||
(mapconcat (lambda (arg) (concat "--build-arg=" (replace-regexp-in-string "\\\\=" "=" (shell-quote-argument arg))))
|
||||
dockerfile-build-args " "))
|
||||
|
||||
(defun dockerfile-standard-filename (file)
|
||||
"Convert the FILE name to OS standard.
|
||||
If in Cygwin environment, uses Cygwin specific function to convert the
|
||||
file name. Otherwise, uses Emacs' standard conversion function."
|
||||
(if (fboundp 'cygwin-convert-file-name-to-windows)
|
||||
(replace-regexp-in-string
|
||||
(rx "\\") "\\\\" (cygwin-convert-file-name-to-windows file) t t)
|
||||
(convert-standard-filename file)))
|
||||
|
||||
(defun dockerfile-tag-string (image-name)
|
||||
"Return a --tag shell-quoted IMAGE-NAME string.
|
||||
|
||||
Returns an empty string if IMAGE-NAME is blank."
|
||||
(if (string= image-name "") "" (format "--tag %s " (shell-quote-argument image-name))))
|
||||
|
||||
(define-obsolete-variable-alias 'docker-image-name 'dockerfile-image-name "2017-10-22")
|
||||
|
||||
(defvar dockerfile-image-name nil
|
||||
"Name of the dockerfile currently being used.
|
||||
This can be set in file or directory-local variables.")
|
||||
|
||||
(defvar dockerfile-image-name-history nil
|
||||
"History of image names read by `dockerfile-read-image-name'.")
|
||||
|
||||
(defun dockerfile-read-image-name ()
|
||||
"Read a docker image name."
|
||||
(read-string "Image name: " dockerfile-image-name 'dockerfile-image-name-history))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun dockerfile-build-buffer (image-name &optional no-cache)
|
||||
"Build an image called IMAGE-NAME based upon the buffer.
|
||||
|
||||
If the prefix arg NO-CACHE is set, don't cache the image.
|
||||
|
||||
The shell command used to build the image is:
|
||||
|
||||
sudo docker build \\
|
||||
--no-cache \\
|
||||
--force-rm \\
|
||||
--pull \\
|
||||
--tag IMAGE-NAME \\
|
||||
--build-args args \\
|
||||
--progress type \\
|
||||
-f filename \\
|
||||
directory"
|
||||
|
||||
(interactive (list (dockerfile-read-image-name) prefix-arg))
|
||||
(save-buffer)
|
||||
(compilation-start
|
||||
(format
|
||||
"%s%s%s build %s %s %s %s %s --progress %s %s -f %s %s"
|
||||
(if dockerfile-use-buildkit "DOCKER_BUILDKIT=1 " "")
|
||||
(if dockerfile-use-sudo "sudo " "")
|
||||
dockerfile-mode-command
|
||||
(if no-cache "--no-cache" "")
|
||||
(if dockerfile-build-force-rm "--force-rm " "")
|
||||
(if dockerfile-build-pull "--pull " "")
|
||||
(dockerfile-tag-string image-name)
|
||||
(dockerfile-build-arg-string)
|
||||
dockerfile-build-progress
|
||||
(or dockerfile-build-extra-options "")
|
||||
(shell-quote-argument (dockerfile-standard-filename
|
||||
(or (file-remote-p (buffer-file-name) 'localname)
|
||||
(buffer-file-name))))
|
||||
(shell-quote-argument (dockerfile-standard-filename
|
||||
(or (file-remote-p default-directory 'localname)
|
||||
default-directory))))
|
||||
nil
|
||||
(lambda (_) (format "*docker-build-output: %s *" image-name))))
|
||||
|
||||
;;;###autoload
|
||||
(defun dockerfile-build-no-cache-buffer (image-name)
|
||||
"Build an image called IMAGE-NAME based upon the buffer without cache."
|
||||
(interactive (list (dockerfile-read-image-name)))
|
||||
(dockerfile-build-buffer image-name t))
|
||||
|
||||
(defun dockerfile--imenu-function ()
|
||||
"Find the previous headline from point.
|
||||
|
||||
Search for a FROM instruction. If an alias is used this is
|
||||
returned, otherwise the base image name is used."
|
||||
(when (re-search-backward dockerfile--from-regex nil t)
|
||||
(let ((data (match-data)))
|
||||
(when (match-string 2)
|
||||
;; we drop the first match group because
|
||||
;; imenu-generic-expression can only use one offset, so we
|
||||
;; normalize to `1'.
|
||||
(set-match-data (list (nth 0 data) (nth 1 data) (nth 4 data) (nth 5 data))))
|
||||
t)))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode dockerfile-mode prog-mode "Dockerfile"
|
||||
"A major mode to edit Dockerfiles.
|
||||
\\{dockerfile-mode-map}"
|
||||
(set-syntax-table dockerfile-mode-syntax-table)
|
||||
(set (make-local-variable 'imenu-generic-expression)
|
||||
`(("Stage" dockerfile--imenu-function 1)))
|
||||
(set (make-local-variable 'require-final-newline) mode-require-final-newline)
|
||||
(set (make-local-variable 'comment-start) "#")
|
||||
(set (make-local-variable 'comment-end) "")
|
||||
(set (make-local-variable 'comment-start-skip) "#+ *")
|
||||
(set (make-local-variable 'parse-sexp-ignore-comments) t)
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
'(dockerfile-font-lock-keywords nil t))
|
||||
(setq local-abbrev-table dockerfile-mode-abbrev-table)
|
||||
(set (make-local-variable 'indent-line-function) #'dockerfile-indent-line-function))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons (concat "[/\\]"
|
||||
"\\(?:Containerfile\\|Dockerfile\\)"
|
||||
"\\(?:\\.[^/\\]*\\)?\\'")
|
||||
'dockerfile-mode))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.dockerfile\\'" . dockerfile-mode))
|
||||
|
||||
(provide 'dockerfile-mode)
|
||||
|
||||
;;; dockerfile-mode.el ends here
|
||||
@@ -1,165 +0,0 @@
|
||||
;;; queue.el --- Queue data structure -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1991-1995, 2008-2009, 2012, 2017 Free Software Foundation, Inc
|
||||
|
||||
;; Author: Inge Wallin <inge@lysator.liu.se>
|
||||
;; Toby Cubitt <toby-predictive@dr-qubit.org>
|
||||
;; Maintainer: Toby Cubitt <toby-predictive@dr-qubit.org>
|
||||
;; Version: 0.2
|
||||
;; Keywords: extensions, data structures, queue
|
||||
;; URL: http://www.dr-qubit.org/emacs.php
|
||||
;; Repository: http://www.dr-qubit.org/git/predictive.git
|
||||
|
||||
;; This file is part of 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; These queues can be used both as a first-in last-out (FILO) and as a
|
||||
;; first-in first-out (FIFO) stack, i.e. elements can be added to the front or
|
||||
;; back of the queue, and can be removed from the front. (This type of data
|
||||
;; structure is sometimes called an "output-restricted deque".)
|
||||
;;
|
||||
;; You create a queue using `make-queue', add an element to the end of the
|
||||
;; queue using `queue-enqueue', and push an element onto the front of the
|
||||
;; queue using `queue-prepend'. To remove the first element from a queue, use
|
||||
;; `queue-dequeue'. A number of other queue convenience functions are also
|
||||
;; provided, all starting with the prefix `queue-'. Functions with prefix
|
||||
;; `queue--' are for internal use only, and should never be used outside this
|
||||
;; package.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(defmacro queue--when-generators (then)
|
||||
"Evaluate THEN if `generator' library is available."
|
||||
(declare (debug t))
|
||||
(if (require 'generator nil 'noerror) then))
|
||||
|
||||
|
||||
(defstruct (queue
|
||||
;; A tagged list is the pre-defstruct representation.
|
||||
;; (:type list)
|
||||
:named
|
||||
(:constructor nil)
|
||||
(:constructor queue-create ())
|
||||
(:copier nil))
|
||||
head tail)
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'make-queue 'queue-create
|
||||
"Create an empty queue data structure.")
|
||||
|
||||
|
||||
(defun queue-enqueue (queue element)
|
||||
"Append an ELEMENT to the end of the QUEUE."
|
||||
(if (queue-head queue)
|
||||
(setcdr (queue-tail queue)
|
||||
(setf (queue-tail queue) (cons element nil)))
|
||||
(setf (queue-head queue)
|
||||
(setf (queue-tail queue) (cons element nil)))))
|
||||
|
||||
(defalias 'queue-append 'queue-enqueue)
|
||||
|
||||
|
||||
(defun queue-prepend (queue element)
|
||||
"Prepend an ELEMENT to the front of the QUEUE."
|
||||
(if (queue-head queue)
|
||||
(push element (queue-head queue))
|
||||
(setf (queue-head queue)
|
||||
(setf (queue-tail queue) (cons element nil)))))
|
||||
|
||||
|
||||
(defun queue-dequeue (queue)
|
||||
"Remove the first element of QUEUE and return it.
|
||||
Returns nil if the queue is empty."
|
||||
(unless (cdr (queue-head queue)) (setf (queue-tail queue) nil))
|
||||
(pop (queue-head queue)))
|
||||
|
||||
|
||||
(defun queue-empty (queue)
|
||||
"Return t if QUEUE is empty, otherwise return nil."
|
||||
(null (queue-head queue)))
|
||||
|
||||
|
||||
(defun queue-first (queue)
|
||||
"Return the first element of QUEUE or nil if it is empty,
|
||||
without removing it from the QUEUE."
|
||||
(car (queue-head queue)))
|
||||
|
||||
|
||||
(defun queue-nth (queue n)
|
||||
"Return the nth element of a queue, without removing it.
|
||||
If the length of the queue is less than N, return nil. The first
|
||||
element in the queue has index 0."
|
||||
(nth n (queue-head queue)))
|
||||
|
||||
|
||||
(defun queue-last (queue)
|
||||
"Return the last element of QUEUE, without removing it.
|
||||
Returns nil if the QUEUE is empty."
|
||||
(car (queue-tail queue)))
|
||||
|
||||
|
||||
(defun queue-all (queue)
|
||||
"Return a list of all elements of QUEUE or nil if it is empty.
|
||||
The oldest element in the queue is the first in the list."
|
||||
(queue-head queue))
|
||||
|
||||
|
||||
(defun queue-copy (queue)
|
||||
"Return a copy of QUEUE.
|
||||
The new queue contains the elements of QUEUE in the same
|
||||
order. The elements themselves are *not* copied."
|
||||
(let ((q (queue-create))
|
||||
(list (queue-head queue)))
|
||||
(when (queue-head queue)
|
||||
(setf (queue-head q) (cons (car (queue-head queue)) nil)
|
||||
(queue-tail q) (queue-head q))
|
||||
(while (setq list (cdr list))
|
||||
(setf (queue-tail q)
|
||||
(setcdr (queue-tail q) (cons (car list) nil)))))
|
||||
q))
|
||||
|
||||
|
||||
(defun queue-length (queue)
|
||||
"Return the number of elements in QUEUE."
|
||||
(length (queue-head queue)))
|
||||
|
||||
|
||||
(defun queue-clear (queue)
|
||||
"Remove all elements from QUEUE."
|
||||
(setf (queue-head queue) nil
|
||||
(queue-tail queue) nil))
|
||||
|
||||
|
||||
(queue--when-generators
|
||||
(iter-defun queue-iter (queue)
|
||||
"Return a queue iterator object.
|
||||
|
||||
Calling `iter-next' on this object will retrieve the next element
|
||||
from the queue. The queue itself is not modified."
|
||||
(let ((list (queue-head queue)))
|
||||
(while list (iter-yield (pop list))))))
|
||||
|
||||
|
||||
(provide 'queue)
|
||||
|
||||
|
||||
;;; queue.el ends here
|
||||
File diff suppressed because it is too large
Load Diff
1484
.emacs.d/lisp/vundo.el
Normal file
1484
.emacs.d/lisp/vundo.el
Normal file
File diff suppressed because it is too large
Load Diff
491
.emacs.d/lisp/yaml-mode.el
Normal file
491
.emacs.d/lisp/yaml-mode.el
Normal file
@@ -0,0 +1,491 @@
|
||||
;;; yaml-mode.el --- Major mode for editing YAML files -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2014 Yoshiki Kurihara
|
||||
|
||||
;; Author: Yoshiki Kurihara <clouder@gmail.com>
|
||||
;; Marshall T. Vandegrift <llasram@gmail.com>
|
||||
;; Maintainer: Vasilij Schneidermann <mail@vasilij.de>
|
||||
;; URL: https://github.com/yoshiki/yaml-mode
|
||||
;; Package-Requires: ((emacs "24.1"))
|
||||
;; Keywords: data yaml
|
||||
;; Version: 0.0.16
|
||||
|
||||
;; This file is not part of Emacs
|
||||
|
||||
;; This program 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.
|
||||
|
||||
;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This is a major mode for editing files in the YAML data
|
||||
;; serialization format. It was initially developed by Yoshiki
|
||||
;; Kurihara and many features were added by Marshall Vandegrift. As
|
||||
;; YAML and Python share the fact that indentation determines
|
||||
;; structure, this mode provides indentation and indentation command
|
||||
;; behavior very similar to that of python-mode.
|
||||
|
||||
;;; Installation:
|
||||
|
||||
;; To install, just drop this file into a directory in your
|
||||
;; `load-path' and (optionally) byte-compile it. To automatically
|
||||
;; handle files ending in '.yml', add something like:
|
||||
;;
|
||||
;; (require 'yaml-mode)
|
||||
;; (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
|
||||
;;
|
||||
;; to your .emacs file.
|
||||
;;
|
||||
;; Unlike python-mode, this mode follows the Emacs convention of not
|
||||
;; binding the ENTER key to `newline-and-indent'. To get this
|
||||
;; behavior, add the key definition to `yaml-mode-hook':
|
||||
;;
|
||||
;; (add-hook 'yaml-mode-hook
|
||||
;; '(lambda ()
|
||||
;; (define-key yaml-mode-map "\C-m" 'newline-and-indent)))
|
||||
|
||||
;;; Known Bugs:
|
||||
|
||||
;; YAML is easy to write but complex to parse, and this mode doesn't
|
||||
;; even really try. Indentation and highlighting will break on
|
||||
;; abnormally complicated structures.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
;; User definable variables
|
||||
|
||||
;;;###autoload
|
||||
(defgroup yaml nil
|
||||
"Support for the YAML serialization format"
|
||||
:group 'languages
|
||||
:prefix "yaml-")
|
||||
|
||||
(defcustom yaml-mode-hook nil
|
||||
"*Hook run by `yaml-mode'."
|
||||
:type 'hook
|
||||
:group 'yaml)
|
||||
|
||||
(defcustom yaml-indent-offset 2
|
||||
"*Amount of offset per level of indentation."
|
||||
:type 'integer
|
||||
:safe 'natnump
|
||||
:group 'yaml)
|
||||
|
||||
(defcustom yaml-backspace-function 'backward-delete-char-untabify
|
||||
"*Function called by `yaml-electric-backspace' when deleting backwards.
|
||||
It will receive one argument, the numeric prefix value."
|
||||
:type 'function
|
||||
:group 'yaml)
|
||||
|
||||
(defcustom yaml-block-literal-search-lines 100
|
||||
"*Maximum number of lines to search for start of block literals."
|
||||
:type 'integer
|
||||
:group 'yaml)
|
||||
|
||||
(defcustom yaml-block-literal-electric-alist
|
||||
'((?| . "") (?> . "-"))
|
||||
"*Characters for which to provide electric behavior.
|
||||
The association list key should be a key code and the associated value
|
||||
should be a string containing additional characters to insert when
|
||||
that key is pressed to begin a block literal."
|
||||
:type 'alist
|
||||
:group 'yaml)
|
||||
|
||||
(defface yaml-tab-face
|
||||
'((((class color)) (:background "red" :foreground "red" :bold t))
|
||||
(t (:inverse-video t)))
|
||||
"Face to use for highlighting tabs in YAML files."
|
||||
:group 'faces
|
||||
:group 'yaml)
|
||||
|
||||
(defcustom yaml-imenu-generic-expression
|
||||
'((nil "^\\(:?[a-zA-Z_-]+\\):" 1))
|
||||
"The imenu regex to parse an outline of the yaml file."
|
||||
:type 'string
|
||||
:group 'yaml)
|
||||
|
||||
|
||||
;; Constants
|
||||
|
||||
(defconst yaml-mode-version "0.0.15" "Version of `yaml-mode'.")
|
||||
|
||||
(defconst yaml-blank-line-re "^ *$"
|
||||
"Regexp matching a line containing only (valid) whitespace.")
|
||||
|
||||
(defconst yaml-directive-re "^\\(?:--- \\)? *%\\(\\w+\\)"
|
||||
"Regexp matching a line containing a YAML directive.")
|
||||
|
||||
(defconst yaml-document-delimiter-re "^\\(?:---\\|[.][.][.]\\)"
|
||||
"Rexexp matching a YAML document delimiter line.")
|
||||
|
||||
(defconst yaml-node-anchor-alias-re "[&*][a-zA-Z0-9_-]+"
|
||||
"Regexp matching a YAML node anchor or alias.")
|
||||
|
||||
(defconst yaml-tag-re "!!?[^ \n]+"
|
||||
"Rexexp matching a YAML tag.")
|
||||
|
||||
(defconst yaml-bare-scalar-re
|
||||
"\\(?:[^-:,#!\n{\\[ ]\\|[^#!\n{\\[ ]\\S-\\)[^#\n]*?"
|
||||
"Rexexp matching a YAML bare scalar.")
|
||||
|
||||
(defconst yaml-hash-key-re
|
||||
(concat "\\(?:^\\(?:--- \\)?\\|{\\|\\(?:[-,] +\\)+\\) *"
|
||||
"\\(?:" yaml-tag-re " +\\)?"
|
||||
"\\(" yaml-bare-scalar-re "\\) *:"
|
||||
"\\(?: +\\|$\\)")
|
||||
"Regexp matching a single YAML hash key.")
|
||||
|
||||
(defconst yaml-scalar-context-re
|
||||
(concat "\\(?:^\\(?:--- \\)?\\|{\\|\\(?: *[-,] +\\)+\\) *"
|
||||
"\\(?:" yaml-bare-scalar-re " *: \\)?")
|
||||
"Regexp indicating the beginning of a scalar context.")
|
||||
|
||||
(defconst yaml-nested-map-re
|
||||
(concat "[^#\n]*: *\\(?:&.*\\|{ *\\|" yaml-tag-re " *\\)?$")
|
||||
"Regexp matching a line beginning a YAML nested structure.")
|
||||
|
||||
(defconst yaml-block-literal-base-re " *[>|][-+0-9]* *\\(?:\n\\|\\'\\)"
|
||||
"Regexp matching the substring start of a block literal.")
|
||||
|
||||
(defconst yaml-block-literal-re
|
||||
(concat yaml-scalar-context-re
|
||||
"\\(?:" yaml-tag-re "\\)?"
|
||||
yaml-block-literal-base-re)
|
||||
"Regexp matching a line beginning a YAML block literal.")
|
||||
|
||||
(defconst yaml-nested-sequence-re
|
||||
(concat "^\\(?:\\(?: *- +\\)+\\|\\(:? *-$\\)\\)"
|
||||
"\\(?:" yaml-bare-scalar-re " *:\\(?: +.*\\)?\\)?$")
|
||||
"Regexp matching a line containing one or more nested YAML sequences.")
|
||||
|
||||
(defconst yaml-constant-scalars-re
|
||||
(concat "\\(?:^\\|\\(?::\\|-\\|,\\|{\\|\\[\\) +\\) *"
|
||||
(regexp-opt
|
||||
'("~" "null" "Null" "NULL"
|
||||
".nan" ".NaN" ".NAN"
|
||||
".inf" ".Inf" ".INF"
|
||||
"-.inf" "-.Inf" "-.INF"
|
||||
"y" "Y" "yes" "Yes" "YES" "n" "N" "no" "No" "NO"
|
||||
"true" "True" "TRUE" "false" "False" "FALSE"
|
||||
"on" "On" "ON" "off" "Off" "OFF") t)
|
||||
"\\_>")
|
||||
"Regexp matching certain scalar constants in scalar context.")
|
||||
|
||||
|
||||
;; Mode setup
|
||||
|
||||
(defvar yaml-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "|" 'yaml-electric-bar-and-angle)
|
||||
(define-key map ">" 'yaml-electric-bar-and-angle)
|
||||
(define-key map "-" 'yaml-electric-dash-and-dot)
|
||||
(define-key map "." 'yaml-electric-dash-and-dot)
|
||||
(define-key map (kbd "DEL") 'yaml-electric-backspace)
|
||||
map)
|
||||
"Keymap used in `yaml-mode' buffers.")
|
||||
|
||||
(defvar yaml-mode-syntax-table
|
||||
(let ((syntax-table (make-syntax-table)))
|
||||
(modify-syntax-entry ?\' "\"" syntax-table)
|
||||
(modify-syntax-entry ?\" "\"" syntax-table)
|
||||
(modify-syntax-entry ?# "<" syntax-table)
|
||||
(modify-syntax-entry ?\n ">" syntax-table)
|
||||
(modify-syntax-entry ?\\ "\\" syntax-table)
|
||||
(modify-syntax-entry ?- "_" syntax-table)
|
||||
(modify-syntax-entry ?_ "_" syntax-table)
|
||||
(modify-syntax-entry ?& "." syntax-table)
|
||||
(modify-syntax-entry ?* "." syntax-table)
|
||||
(modify-syntax-entry ?\( "." syntax-table)
|
||||
(modify-syntax-entry ?\) "." syntax-table)
|
||||
(modify-syntax-entry ?\{ "(}" syntax-table)
|
||||
(modify-syntax-entry ?\} "){" syntax-table)
|
||||
(modify-syntax-entry ?\[ "(]" syntax-table)
|
||||
(modify-syntax-entry ?\] ")[" syntax-table)
|
||||
syntax-table)
|
||||
"Syntax table in use in `yaml-mode' buffers.")
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode yaml-mode text-mode "YAML"
|
||||
"Simple mode to edit YAML.
|
||||
|
||||
\\{yaml-mode-map}"
|
||||
:syntax-table yaml-mode-syntax-table
|
||||
(set (make-local-variable 'comment-start) "# ")
|
||||
(set (make-local-variable 'comment-start-skip) "#+ *")
|
||||
(set (make-local-variable 'comment-end) "")
|
||||
(set (make-local-variable 'indent-line-function) 'yaml-indent-line)
|
||||
(set (make-local-variable 'indent-tabs-mode) nil)
|
||||
(set (make-local-variable 'fill-paragraph-function) 'yaml-fill-paragraph)
|
||||
(set (make-local-variable 'page-delimiter) "^---\\([ \t].*\\)*\n")
|
||||
|
||||
(set (make-local-variable 'syntax-propertize-function)
|
||||
'yaml-mode-syntax-propertize-function)
|
||||
(setq font-lock-defaults '(yaml-font-lock-keywords)))
|
||||
|
||||
|
||||
;; Font-lock support
|
||||
|
||||
(defvar yaml-font-lock-keywords
|
||||
`((yaml-font-lock-block-literals 0 font-lock-string-face)
|
||||
(,yaml-constant-scalars-re . (1 font-lock-constant-face))
|
||||
(,yaml-tag-re . (0 font-lock-type-face))
|
||||
(,yaml-node-anchor-alias-re . (0 font-lock-function-name-face))
|
||||
(,yaml-hash-key-re . (1 font-lock-variable-name-face))
|
||||
(,yaml-document-delimiter-re . (0 font-lock-comment-face))
|
||||
(,yaml-directive-re . (1 font-lock-builtin-face))
|
||||
("^[\t]+" 0 'yaml-tab-face t))
|
||||
"Additional expressions to highlight in YAML mode.")
|
||||
|
||||
(defun yaml-mode-syntax-propertize-function (beg end)
|
||||
"Override buffer's syntax table for special syntactic constructs."
|
||||
;; Unhighlight foo#bar tokens between BEG and END.
|
||||
(save-excursion
|
||||
(goto-char beg)
|
||||
(while (search-forward "#" end t)
|
||||
(save-excursion
|
||||
(forward-char -1)
|
||||
;; both ^# and [ \t]# are comments
|
||||
(when (and (not (bolp))
|
||||
(not (memq (preceding-char) '(?\s ?\t))))
|
||||
(put-text-property (point) (1+ (point))
|
||||
'syntax-table (string-to-syntax "_"))))))
|
||||
|
||||
(save-excursion
|
||||
(goto-char beg)
|
||||
(while (and
|
||||
(> end (point))
|
||||
(re-search-forward "['\"]" end t))
|
||||
(when (get-text-property (point) 'yaml-block-literal)
|
||||
(put-text-property (1- (point)) (point)
|
||||
'syntax-table (string-to-syntax "w")))
|
||||
(let* ((pt (point))
|
||||
(sps (save-excursion (syntax-ppss (1- pt)))))
|
||||
(when (not (nth 8 sps))
|
||||
(cond
|
||||
((and (char-equal ?' (char-before (1- pt)))
|
||||
(char-equal ?' (char-before pt)))
|
||||
(put-text-property (- pt 2) pt
|
||||
'syntax-table (string-to-syntax "w"))
|
||||
;; Workaround for https://debbugs.gnu.org/41195.
|
||||
(let ((syntax-propertize--done syntax-propertize--done))
|
||||
;; Carefully invalidate the last cached ppss.
|
||||
(syntax-ppss-flush-cache (- pt 2))))
|
||||
;; If quote is detected as a syntactic string start but appeared
|
||||
;; after a non-whitespace character, then mark it as syntactic word.
|
||||
((and (char-before (1- pt))
|
||||
(char-equal ?w (char-syntax (char-before (1- pt)))))
|
||||
(put-text-property (1- pt) pt
|
||||
'syntax-table (string-to-syntax "w")))
|
||||
(t
|
||||
;; We're right after a quote that opens a string literal.
|
||||
;; Skip over it (big speedup for long JSON strings).
|
||||
(goto-char (1- pt))
|
||||
(condition-case nil
|
||||
(forward-sexp)
|
||||
(scan-error
|
||||
(goto-char end))))))))))
|
||||
|
||||
(defun yaml-font-lock-block-literals (bound)
|
||||
"Find lines within block literals.
|
||||
Find the next line of the first (if any) block literal after point and
|
||||
prior to BOUND. Returns the beginning and end of the block literal
|
||||
line in the match data, as consumed by `font-lock-keywords' matcher
|
||||
functions. The function begins by searching backwards to determine
|
||||
whether or not the current line is within a block literal. This could
|
||||
be time-consuming in large buffers, so the number of lines searched is
|
||||
artificially limited to the value of
|
||||
`yaml-block-literal-search-lines'."
|
||||
(if (eolp) (goto-char (1+ (point))))
|
||||
(unless (or (eobp) (>= (point) bound))
|
||||
(let ((begin (point))
|
||||
(end (min (1+ (line-end-position)) bound)))
|
||||
(goto-char (line-beginning-position))
|
||||
(while (and (looking-at yaml-blank-line-re)
|
||||
(not (bobp)))
|
||||
(forward-line -1))
|
||||
(let ((nlines yaml-block-literal-search-lines)
|
||||
(min-level (current-indentation)))
|
||||
(forward-line -1)
|
||||
(while (and (/= nlines 0)
|
||||
(/= min-level 0)
|
||||
(not (looking-at yaml-block-literal-re))
|
||||
(not (bobp)))
|
||||
(setq nlines (1- nlines))
|
||||
(unless (looking-at yaml-blank-line-re)
|
||||
(setq min-level (min min-level (current-indentation))))
|
||||
(forward-line -1))
|
||||
(when (looking-at-p " *- ")
|
||||
(setq min-level (- min-level 2)))
|
||||
(cond
|
||||
((and (< (current-indentation) min-level)
|
||||
(looking-at yaml-block-literal-re))
|
||||
(goto-char end)
|
||||
(put-text-property begin end 'yaml-block-literal t)
|
||||
(set-match-data (list begin end))
|
||||
t)
|
||||
((progn
|
||||
(goto-char begin)
|
||||
(re-search-forward (concat yaml-block-literal-re
|
||||
" *\\(.*\\)\n")
|
||||
bound t))
|
||||
(let ((range (nthcdr 2 (match-data))))
|
||||
(put-text-property (car range) (cadr range) 'yaml-block-literal t)
|
||||
(set-match-data range))
|
||||
t))))))
|
||||
|
||||
|
||||
;; Indentation and electric keys
|
||||
|
||||
(defun yaml-compute-indentation ()
|
||||
"Calculate the maximum sensible indentation for the current line."
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(if (looking-at yaml-document-delimiter-re) 0
|
||||
(forward-line -1)
|
||||
(while (and (looking-at yaml-blank-line-re)
|
||||
(> (point) (point-min)))
|
||||
(forward-line -1))
|
||||
(+ (current-indentation)
|
||||
(if (looking-at yaml-nested-map-re) yaml-indent-offset 0)
|
||||
(if (looking-at yaml-nested-sequence-re) yaml-indent-offset 0)
|
||||
(if (looking-at yaml-block-literal-re) yaml-indent-offset 0)))))
|
||||
|
||||
(defun yaml-indent-line ()
|
||||
"Indent the current line.
|
||||
The first time this command is used, the line will be indented to the
|
||||
maximum sensible indentation. Each immediately subsequent usage will
|
||||
back-dent the line by `yaml-indent-offset' spaces. On reaching column
|
||||
0, it will cycle back to the maximum sensible indentation."
|
||||
(interactive "*")
|
||||
(let ((ci (current-indentation))
|
||||
(need (yaml-compute-indentation)))
|
||||
(save-excursion
|
||||
(if (and (equal last-command this-command) (/= ci 0))
|
||||
(indent-line-to (* (/ (- ci 1) yaml-indent-offset) yaml-indent-offset))
|
||||
(indent-line-to need)))
|
||||
(if (< (current-column) (current-indentation))
|
||||
(forward-to-indentation 0))))
|
||||
|
||||
(defun yaml-electric-backspace (arg)
|
||||
"Delete characters or back-dent the current line.
|
||||
If invoked following only whitespace on a line, will back-dent to the
|
||||
immediately previous multiple of `yaml-indent-offset' spaces."
|
||||
(interactive "*p")
|
||||
(if (or (/= (current-indentation) (current-column)) (bolp))
|
||||
(funcall yaml-backspace-function arg)
|
||||
(let ((ci (current-column)))
|
||||
(beginning-of-line)
|
||||
(delete-horizontal-space)
|
||||
(indent-to (* (/ (- ci (* arg yaml-indent-offset))
|
||||
yaml-indent-offset)
|
||||
yaml-indent-offset)))))
|
||||
|
||||
(defun yaml-electric-bar-and-angle (arg)
|
||||
"Insert the bound key and possibly begin a block literal.
|
||||
Inserts the bound key. If inserting the bound key causes the current
|
||||
line to match the initial line of a block literal, then inserts the
|
||||
matching string from `yaml-block-literal-electric-alist', a newline,
|
||||
and indents appropriately."
|
||||
(interactive "*P")
|
||||
(self-insert-command (prefix-numeric-value arg))
|
||||
(let ((extra-chars
|
||||
(assoc last-command-event
|
||||
yaml-block-literal-electric-alist)))
|
||||
(cond
|
||||
((and extra-chars (not arg) (eolp)
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(looking-at yaml-block-literal-re)))
|
||||
(insert (cdr extra-chars))
|
||||
(newline-and-indent)))))
|
||||
|
||||
(defun yaml-electric-dash-and-dot (arg)
|
||||
"Insert the bound key and possibly de-dent line.
|
||||
Inserts the bound key. If inserting the bound key causes the current
|
||||
line to match a document delimiter, de-dent the line to the left
|
||||
margin."
|
||||
(interactive "*P")
|
||||
(self-insert-command (prefix-numeric-value arg))
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(when (and (not arg) (looking-at yaml-document-delimiter-re))
|
||||
(delete-horizontal-space))))
|
||||
|
||||
(defun yaml-narrow-to-block-literal ()
|
||||
"Narrow the buffer to block literal if the point is in it,
|
||||
otherwise do nothing."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position))
|
||||
(while (and (looking-at-p yaml-blank-line-re) (not (bobp)))
|
||||
(forward-line -1))
|
||||
(let ((nlines yaml-block-literal-search-lines)
|
||||
(min-level (current-indentation))
|
||||
beg)
|
||||
(forward-line -1)
|
||||
(while (and (/= nlines 0)
|
||||
(/= min-level 0)
|
||||
(not (looking-at-p yaml-block-literal-re))
|
||||
(not (bobp)))
|
||||
(setq nlines (1- nlines))
|
||||
(unless (looking-at-p yaml-blank-line-re)
|
||||
(setq min-level (min min-level (current-indentation))))
|
||||
(forward-line -1))
|
||||
(when (and (< (current-indentation) min-level)
|
||||
(looking-at-p yaml-block-literal-re))
|
||||
(setq min-level (current-indentation))
|
||||
(forward-line)
|
||||
(setq beg (point))
|
||||
(while (and (not (eobp))
|
||||
(or (looking-at-p yaml-blank-line-re)
|
||||
(> (current-indentation) min-level)))
|
||||
(forward-line))
|
||||
(narrow-to-region beg (point))))))
|
||||
|
||||
(defun yaml-fill-paragraph (&optional justify region)
|
||||
"Fill paragraph.
|
||||
Outside of comments, this behaves as `fill-paragraph' except that
|
||||
filling does not cross boundaries of block literals. Inside comments,
|
||||
this will do usual adaptive fill behaviors."
|
||||
(interactive "*P")
|
||||
(save-restriction
|
||||
(yaml-narrow-to-block-literal)
|
||||
(let ((fill-paragraph-function nil))
|
||||
(or (fill-comment-paragraph justify)
|
||||
(fill-paragraph justify region)))))
|
||||
|
||||
(defun yaml-set-imenu-generic-expression ()
|
||||
(make-local-variable 'imenu-generic-expression)
|
||||
(make-local-variable 'imenu-create-index-function)
|
||||
(setq imenu-create-index-function 'imenu-default-create-index-function)
|
||||
(setq imenu-generic-expression yaml-imenu-generic-expression))
|
||||
|
||||
(add-hook 'yaml-mode-hook 'yaml-set-imenu-generic-expression)
|
||||
|
||||
|
||||
(defun yaml-mode-version ()
|
||||
"Display version of `yaml-mode'."
|
||||
(interactive)
|
||||
(message "yaml-mode %s" yaml-mode-version)
|
||||
yaml-mode-version)
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'magic-mode-alist
|
||||
'("^%YAML\\s-+[0-9]+\\.[0-9]+\\(\\s-+#\\|\\s-*$\\)" . yaml-mode))
|
||||
|
||||
(provide 'yaml-mode)
|
||||
|
||||
;;; yaml-mode.el ends here
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
@@ -12,12 +12,17 @@
|
||||
'bedroom
|
||||
;; Basic faces
|
||||
'(default ((t (:foreground "#DADEE5" :background "#141B2B"))))
|
||||
'(cursor ((t (:background "#FF69B4"))))
|
||||
'(cursor ((t (:background "lightgreen"))))
|
||||
'(region ((t (:background "#15285A"))))
|
||||
'(hl-line ((t (:background "#000000"))))
|
||||
'(highlight ((t (:background "#15285A"))))
|
||||
'(mode-line ((t (:background "#d3b58d" :foreground "#141B2B"))))
|
||||
'(mode-line-inactive ((t (:inverse-video t))))
|
||||
'(mode-line ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(mode-line-inactive ((t (:background "#2A2A2A" :foreground "#888888"))))
|
||||
'(vertical-border ((t (:foreground "#505050"))))
|
||||
'(tab-line ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(tab-line-tab ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(tab-line-tab-current ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(tab-line-tab-inactive ((t (:background "#383838" :foreground "#888888"))))
|
||||
|
||||
;; Font lock faces
|
||||
'(font-lock-builtin-face ((t (:foreground "#DADEE5"))))
|
||||
|
||||
442
.emacs.d/themes/jbeans-theme.el
Normal file
442
.emacs.d/themes/jbeans-theme.el
Normal file
@@ -0,0 +1,442 @@
|
||||
;;; jbeans-theme.el --- Jbeans theme for GNU Emacs 24 (deftheme)
|
||||
|
||||
;; Author: Adam Olsen <arolsen@gmail.com>
|
||||
;; URL: <https://github.com/synic/jbeans-emacs>
|
||||
;; Version: 1.3
|
||||
;; Package-Requires: ((emacs "24"))
|
||||
;; Based On: ujelly by Mark Tran
|
||||
;; Package-Version: 20151208.2136
|
||||
;; "What do you mean, no one calls you JBeans?! I call you JBeans!"
|
||||
;; -- Wilbur
|
||||
|
||||
;; Based on ujelly by Mark Tran <mark.tran@gmail.com>
|
||||
;; Orig-URL: http://github.com/marktran/color-theme-ujelly
|
||||
;; Inspired by jellybeans: http://www.vim.org/scripts/script.php?script_id=2555.
|
||||
|
||||
|
||||
;; Copyright (c) 2017 Adam Olsen <arolsen@gmail.com>
|
||||
;;
|
||||
;; Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
;; of this software and associated documentation files (the "Software"), to deal
|
||||
;; in the Software without restriction, including without limitation the rights
|
||||
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
;; copies of the Software, and to permit persons to whom the Software is
|
||||
;; furnished to do so, subject to the following conditions:
|
||||
;;
|
||||
;; The above copyright notice and this permission notice shall be included in all
|
||||
;; copies or substantial portions of the Software.
|
||||
;;
|
||||
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
;; SOFTWARE.
|
||||
|
||||
(deftheme jbeans "The jbeans color theme")
|
||||
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
;; GUI TER
|
||||
(jbeans-fg (if (display-graphic-p) "#cccccc" "#cccccc"))
|
||||
(jbeans-bg (if (display-graphic-p) "#151515" "#151515"))
|
||||
(jbeans-grey-0 (if (display-graphic-p) "#151515" "#151515"))
|
||||
(jbeans-grey-1 (if (display-graphic-p) "#112433" "#112433"))
|
||||
(jbeans-grey-2 (if (display-graphic-p) "#222222" "#222222"))
|
||||
(jbeans-grey-3 (if (display-graphic-p) "#333344" "#444455"))
|
||||
(jbeans-grey-4 (if (display-graphic-p) "#363636" "#363636"))
|
||||
(jbeans-grey-5 (if (display-graphic-p) "#444444" "#444444"))
|
||||
(jbeans-grey-6 (if (display-graphic-p) "#7f7f7f" "#7f7f7f"))
|
||||
(jbeans-grey-7 (if (display-graphic-p) "#888888" "#888888"))
|
||||
(jbeans-purple-0 (if (display-graphic-p) "#ff73fd" "#ff73fd"))
|
||||
(jbeans-purple-1 (if (display-graphic-p) "#cd00cd" "#cd00cd"))
|
||||
(jbeans-purple-2 (if (display-graphic-p) "#a40073" "#a40073"))
|
||||
(jbeans-purple-3 (if (display-graphic-p) "#540063" "#540063"))
|
||||
(jbeans-purple-4 (if (display-graphic-p) "#474e90" "#474e90"))
|
||||
(jbeans-purple-5 (if (display-graphic-p) "#202025" "#202025"))
|
||||
(jbeans-blue-0 (if (display-graphic-p) "#8197bf" "#8197bf"))
|
||||
(jbeans-blue-1 (if (display-graphic-p) "#8fbfdc" "#8fbfdc"))
|
||||
(jbeans-blue-2 (if (display-graphic-p) "#b2e2fe" "#b2e2fe"))
|
||||
(jbeans-blue-3 (if (display-graphic-p) "#447799" "#447799"))
|
||||
(jbeans-blue-4 (if (display-graphic-p) "#0b24fb" "#0b24fb"))
|
||||
(jbeans-blue-5 (if (display-graphic-p) "#2dfffe" "#2dfffe"))
|
||||
(jbeans-green-0 (if (display-graphic-p) "#ddffdd" "#ddffdd"))
|
||||
(jbeans-green-1 (if (display-graphic-p) "#b6edb6" "#b6edb6"))
|
||||
(jbeans-green-2 (if (display-graphic-p) "#448844" "#448844"))
|
||||
(jbeans-green-3 (if (display-graphic-p) "#556a32" "#556a32"))
|
||||
(jbeans-green-4 (if (display-graphic-p) "#335533" "#335533"))
|
||||
(jbeans-green-5 (if (display-graphic-p) "#99ad6a" "#99ad6a"))
|
||||
(jbeans-green-6 (if (display-graphic-p) "#a8ff60" "#a8ff60"))
|
||||
(jbeans-green-7 (if (display-graphic-p) "#29fd2f" "#29fd2f"))
|
||||
(jbeans-yellow-0 (if (display-graphic-p) "#ffffcc" "#ffffcc"))
|
||||
(jbeans-yellow-1 (if (display-graphic-p) "#ffff00" "#ffff00"))
|
||||
(jbeans-yellow-2 (if (display-graphic-p) "#eddb87" "#eddb87"))
|
||||
(jbeans-yellow-3 (if (display-graphic-p) "#fad07a" "#fad07a"))
|
||||
(jbeans-orange-0 (if (display-graphic-p) "#ffb964" "#ffb964"))
|
||||
(jbeans-orange-1 (if (display-graphic-p) "#ff8c00" "#ebbd87"))
|
||||
(jbeans-orange-2 (if (display-graphic-p) "#b78521" "#b78521"))
|
||||
(jbeans-red-0 (if (display-graphic-p) "#cb8165" "#cb8165"))
|
||||
(jbeans-red-1 (if (display-graphic-p) "#cf6a4c" "#cf6a4c"))
|
||||
(jbeans-red-2 (if (display-graphic-p) "#de5577" "#de5577"))
|
||||
(jbeans-red-3 (if (display-graphic-p) "#fc644d" "#fc644d"))
|
||||
(jbeans-red-4 (if (display-graphic-p) "#dd0093" "#dd0093"))
|
||||
(jbeans-red-5 (if (display-graphic-p) "#aa4444" "#aa4444"))
|
||||
(jbeans-red-6 (if (display-graphic-p) "#8a3b3c" "#8a3b3c"))
|
||||
(jbeans-red-7 (if (display-graphic-p) "#663333" "#663333"))
|
||||
(jbeans-red-8 (if (display-graphic-p) "#fc0d1b" "#fc0d1b"))
|
||||
(jbeans-red-9 (if (display-graphic-p) "#ffdddd" "#ffdddd"))
|
||||
)
|
||||
|
||||
(custom-theme-set-variables
|
||||
'jbeans
|
||||
`(linum-format " %3i "))
|
||||
|
||||
(custom-theme-set-faces
|
||||
'jbeans
|
||||
`(default ((,class (:foreground ,jbeans-fg :background ,jbeans-bg))))
|
||||
;;;;; ACE/Avy
|
||||
`(aw-leading-char-face ((,class (:foreground ,jbeans-red-3 :height 1.2))))
|
||||
;;;;; Alchemist
|
||||
`(alchemist-test--failed-face ((,class (:foreground ,jbeans-red-1))))
|
||||
`(alchemist-test--success-face ((,class (:foreground ,jbeans-green-5))))
|
||||
;;;;; Company
|
||||
`(company-preview-common ((,class (:foreground nil :background ,jbeans-purple-4))))
|
||||
`(company-scrollbar-bg ((,class (:background ,jbeans-grey-0))))
|
||||
`(company-scrollbar-fg ((,class (:background ,jbeans-grey-7))))
|
||||
`(company-tooltip ((,class (:background ,jbeans-grey-0 :foreground ,jbeans-fg :weight bold))))
|
||||
`(company-tooltip-annotation ((,class (:inherit company-tooltip :foreground ,jbeans-blue-0))))
|
||||
`(company-tooltip-common ((,class (:inherit company-tooltip :weight bold :underline nil))))
|
||||
`(company-tooltip-common-selection ((,class (:inherit company-tooltip-selection :foreground ,jbeans-fg :underline nil :weight bold))))
|
||||
`(company-tooltip-selection ((,class (:background ,jbeans-purple-4))))
|
||||
;;;;; Compilation
|
||||
`(compilation-error ((,class (:foreground ,jbeans-red-1))))
|
||||
`(compilation-info ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(compilation-line-number ((,class (:foreground ,jbeans-grey-7))))
|
||||
`(compilation-mode-line-exit ((,class (:foreground ,jbeans-green-5))))
|
||||
`(compilation-mode-line-fail ((,class (:foreground ,jbeans-red-1))))
|
||||
`(compilation-mode-line-run ((,class (:foreground ,jbeans-yellow-3))))
|
||||
;;;;; Dired
|
||||
`(diredp-compressed-file-name ((,class (:foreground ,jbeans-red-7))))
|
||||
`(diredp-compressed-file-suffix ((,class (:foreground ,jbeans-fg))))
|
||||
`(diredp-date-time ((,class (:foreground ,jbeans-green-5))))
|
||||
`(diredp-deletion ((,class (:foreground ,jbeans-red-1 :background ,jbeans-bg))))
|
||||
`(diredp-dir-heading ((,class (:foreground ,jbeans-yellow-3 :background ,jbeans-bg))))
|
||||
`(diredp-dir-priv ((,class (:foreground ,jbeans-purple-2 :background ,jbeans-bg))))
|
||||
`(diredp-exec-priv ((,class (:foreground ,jbeans-orange-2 :background ,jbeans-bg))))
|
||||
`(diredp-file-name ((,class (:foreground ,jbeans-green-0))))
|
||||
`(diredp-file-suffix ((,class (:foreground ,jbeans-fg))))
|
||||
`(diredp-flag-mark ((,class (:foreground ,jbeans-blue-0 :weight bold))))
|
||||
`(diredp-flag-mark-line ((,class (:foreground ,jbeans-purple-4 :weight bold))))
|
||||
`(diredp-link-priv ((,class (:foreground ,jbeans-fg))))
|
||||
`(diredp-number ((,class (:foreground ,jbeans-grey-6))))
|
||||
`(diredp-no-priv ((,class (:foreground ,jbeans-fg :background ,jbeans-bg))))
|
||||
`(diredp-rare-priv ((,class (:foreground ,jbeans-red-1 :background ,jbeans-bg))))
|
||||
`(diredp-read-priv ((,class (:foreground ,jbeans-yellow-3 :background ,jbeans-bg))))
|
||||
`(diredp-symlink ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(diredp-dir-name ((,class (:foreground ,jbeans-blue-2))))
|
||||
`(diredp-write-priv ((,class (:foreground ,jbeans-blue-0 :background ,jbeans-bg))))
|
||||
;;;;; Emmet
|
||||
`(emmet-preview-output ((,class (:background ,jbeans-purple-4))))
|
||||
;;;;; Elixir
|
||||
`(elixir-atom-face ((,class (:foreground ,jbeans-blue-1))))
|
||||
;;;;; ERC
|
||||
`(erc-notice-face ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(erc-prompt-face ((,class (:foreground ,jbeans-fg))))
|
||||
`(erc-timestamp-face ((,class (:foreground ,jbeans-blue-0))))
|
||||
;;;;;; EShell
|
||||
`(eshell-prompt ((,class (:foreground ,jbeans-red-1))))
|
||||
`(eshell-ls-directory ((,class (:weight normal :foreground ,jbeans-green-6))))
|
||||
`(eshell-ls-executable ((,class (:weight normal :foreground ,jbeans-red-1))))
|
||||
`(eshell-ls-product ((,class (:foreground ,jbeans-fg))))
|
||||
`(eshell-ls-symlink ((,class (:weight normal :foreground ,jbeans-purple-1))))
|
||||
;;;;; Evil
|
||||
`(evil-visual-mark-face ((,class (:weight ultra-bold :box ,jbeans-blue-0 :foreground ,jbeans-green-7))))
|
||||
;;;;; FCI Ruler
|
||||
;; As of now, this does nothing, because fci-rule-color is not a face yet.
|
||||
`(fci-rule-color ((,class (:foreground ,jbeans-grey-4 :background ,jbeans-grey-4))))
|
||||
`(fill-column-indicator ((,class (:foreground ,jbeans-grey-3 :background ,jbeans-bg))))
|
||||
;;;;; Fonts
|
||||
`(font-lock-builtin-face ((,class (:foreground ,jbeans-blue-1))))
|
||||
`(font-lock-comment-face ((,class (:slant italic :foreground ,jbeans-grey-7))))
|
||||
`(font-lock-constant-face ((,class (:foreground ,jbeans-blue-3))))
|
||||
`(font-lock-doc-face ((,class (:foreground ,jbeans-green-5))))
|
||||
`(font-lock-function-name-face ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(font-lock-keyword-face ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(font-lock-preprocessor-face ((,class (:foreground ,jbeans-fg))))
|
||||
`(font-lock-string-face ((,class (:foreground ,jbeans-green-5))))
|
||||
`(font-lock-type-face ((,class (:foreground ,jbeans-orange-0))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground ,jbeans-red-1))))
|
||||
`(font-lock-warning-face ((,class (:foreground ,jbeans-red-4))))
|
||||
`(font-lock-regexp-grouping-construct ((,class (:foreground ,jbeans-yellow-3 :bold t))))
|
||||
`(font-lock-regexp-grouping-backslash ((,class (:foreground ,jbeans-red-1 :bold t))))
|
||||
;;;;; Fringe
|
||||
`(fringe ((,class (:foreground ,jbeans-fg :background ,jbeans-bg))))
|
||||
;;;;; Header
|
||||
`(header-line ((,class (:foreground ,jbeans-fg))))
|
||||
;;;;; Helm
|
||||
`(helm-visible-mark ((,class (:background ,jbeans-green-4 :foreground ,jbeans-bg))))
|
||||
`(helm-buffer-file ((,class (:foreground ,jbeans-fg))))
|
||||
`(helm-buffer-directory ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(helm-buffer-process ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(helm-buffer-size ((,class (:foreground ,jbeans-fg))))
|
||||
`(helm-candidate-number ((,class (:foreground ,jbeans-fg :background ,jbeans-bg))))
|
||||
`(helm-grep-lineno ((,class (:foreground ,jbeans-fg))))
|
||||
`(helm-grep-finish ((,class (:foreground ,jbeans-blue-2))))
|
||||
`(helm-match ((,class (:foreground ,jbeans-red-4 :background ,jbeans-bg))))
|
||||
`(helm-moccur-buffer ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(helm-selection ((,class (:background ,jbeans-grey-3))))
|
||||
`(helm-source-header ((,class (:foreground ,jbeans-yellow-3 :background ,jbeans-grey-0))))
|
||||
`(helm-swoop-target-line-face ((,class (:foreground ,jbeans-fg :background ,jbeans-grey-4))))
|
||||
`(helm-swoop-target-word-face ((,class (:foreground ,jbeans-red-4))))
|
||||
`(helm-ff-file ((,class (:foreground ,jbeans-fg))))
|
||||
`(helm-ff-directory ((,class (:foreground ,jbeans-blue-2))))
|
||||
`(helm-ff-executable ((,class (:foreground ,jbeans-green-5))))
|
||||
;;;;; Highlight
|
||||
`(highlight ((,class (:background ,jbeans-grey-3))))
|
||||
`(hl-line ((,class (:background ,jbeans-purple-5))))
|
||||
;;;;; iSearch
|
||||
`(isearch ((,class (:foreground ,jbeans-fg :background ,jbeans-red-4))))
|
||||
`(isearch-fail ((,class (:background ,jbeans-red-4))))
|
||||
;;;;; Ido
|
||||
`(ido-first-match ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(ido-only-match ((,class (:foreground ,jbeans-green-5))))
|
||||
`(ido-subdir ((,class (:foreground ,jbeans-fg))))
|
||||
`(ido-virtual ((,class (:foreground
|
||||
,jbeans-blue-0))))
|
||||
;;;;; Ivy
|
||||
`(ivy-current-match ((,class (:background ,jbeans-grey-3))))
|
||||
`(ivy-minibuffer-match-face-1 ((,class (:foreground ,jbeans-yellow-3))))
|
||||
`(ivy-minibuffer-match-face-2 ((,class (:foreground ,jbeans-orange-0))))
|
||||
`(ivy-minibuffer-match-face-3 ((,class (:foreground ,jbeans-blue-1))))
|
||||
`(ivy-minibuffer-match-face-4 ((,class (:foreground ,jbeans-purple-1))))
|
||||
`(ivy-subdir ((,class (:foreground ,jbeans-green-4))))
|
||||
`(ivy-modified-buffer ((,class (:foreground ,jbeans-red-2))))
|
||||
;;;;; Jabber
|
||||
`(jabber-activity-personal-face ((,class (:foreground ,jbeans-green-6 :weight bold))))
|
||||
`(jabber-activity-face ((,class (:foreground ,jbeans-red-3 :weight bold))))
|
||||
`(jabber-roster-user-online ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(jabber-roster-user-dnd ((,class (:foreground ,jbeans-red-3))))
|
||||
`(jabber-chat-prompt-system ((,class (:foreground ,jbeans-green-6))))
|
||||
`(jabber-chat-prompt-local ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(jabber-chat-prompt-foreign ((,class (:foreground ,jbeans-green-2))))
|
||||
;;;;; Lazy highlight
|
||||
`(lazy-highlight ((,class (:foreground ,jbeans-red-4 :background nil))))
|
||||
;;;;; Linum
|
||||
`(linum ((,class (:foreground ,jbeans-grey-5 :background ,jbeans-grey-2))))
|
||||
;;;;; Display line numbers
|
||||
`(line-number ((,class (:foreground ,jbeans-grey-5 :background ,jbeans-grey-2))))
|
||||
;;;;; Ediff
|
||||
`(ediff-even-diff-A ((,class (:background ,jbeans-grey-2 :foreground ,jbeans-fg))))
|
||||
`(ediff-even-diff-B ((,class (:background ,jbeans-grey-3 :foreground ,jbeans-fg))))
|
||||
`(ediff-even-diff-C ((,class (:background ,jbeans-grey-3 :foreground ,jbeans-fg))))
|
||||
`(ediff-odd-diff-A ((,class (:background ,jbeans-grey-2 :foreground ,jbeans-fg))))
|
||||
`(ediff-odd-diff-B ((,class (:background ,jbeans-grey-3 :foreground ,jbeans-fg))))
|
||||
`(ediff-odd-diff-C ((,class (:background ,jbeans-grey-5 :foreground ,jbeans-fg))))
|
||||
`(powerline-active1 ((,class (:inherit mode-line :background ,jbeans-bg))))
|
||||
`(powerline-active2 ((,class (:inherit mode-line :background ,jbeans-grey-3))))
|
||||
`(powerline-inactive1 ((,class (:inherit mode-line :background ,jbeans-bg))))
|
||||
`(powerline-inactive2 ((,class (:inherit mode-line :background ,jbeans-grey-2))))
|
||||
;;;;; flycheck
|
||||
`(flycheck-error ((((supports :underline (:style wave)))
|
||||
(:underline (:style wave :color ,jbeans-red-4) :inherit unspecified))
|
||||
(,class (:underline (:style line :color ,jbeans-red-4)))))
|
||||
`(flycheck-warning ((((supports :underline (:style wave)))
|
||||
(:underline (:style wave :color ,jbeans-yellow-3) :inherit unspecified))
|
||||
(,class (:underline (:style line :color ,jbeans-yellow-3)))))
|
||||
`(flycheck-info ((((supports :underline (:style wave)))
|
||||
(:underline (:style wave :color ,jbeans-blue-5) :inherit unspecified))
|
||||
(,class (:underline (:style line :color ,jbeans-blue-5)))))
|
||||
`(flycheck-fringe-error ((,class (:foreground ,jbeans-red-4 :weight bold))))
|
||||
`(flycheck-fringe-warning ((,class (:foreground ,jbeans-yellow-3 :weight bold))))
|
||||
`(flycheck-fringe-info ((,class (:foreground ,jbeans-blue-5 :weight bold))))
|
||||
;;;;; flyspell
|
||||
`(flyspell-duplicate ((((supports :underline (:style wave)))
|
||||
(:underline (:style wave :color ,jbeans-orange-1) :inherit unspecified))
|
||||
(,class (:underline (:style line :color ,jbeans-orange-1)))))
|
||||
`(flyspell-incorrect ((((supports :underline (:style wave)))
|
||||
(:underline (:style wave :color ,jbeans-red-8) :inherit unspecified))
|
||||
(,class (:underline (:style line :color ,jbeans-red-8)))))
|
||||
;;;;; Git
|
||||
`(git-commit-comment-file ((,class (:background ,jbeans-bg :foreground ,jbeans-fg))))
|
||||
`(git-commit-summary ((,class (:background ,jbeans-bg :foreground ,jbeans-blue-0))))
|
||||
`(git-commit-comment-heading ((,class (:foreground ,jbeans-yellow-3))))
|
||||
;;;;; Git-gutter
|
||||
`(git-gutter-fr+-modified ((,class (:foreground ,jbeans-blue-3 :background ,jbeans-bg))))
|
||||
`(git-gutter-fr+-added ((,class (:foreground ,jbeans-green-2 :background ,jbeans-bg))))
|
||||
`(git-gutter-fr+-deleted ((,class (:foreground
|
||||
,jbeans-red-5 :background ,jbeans-bg))))
|
||||
;;;;; Highlighting
|
||||
`(hi-yellow ((,class (:box ,jbeans-yellow-1 :foreground ,jbeans-yellow-1 :background, jbeans-grey-4))))
|
||||
;;;;; Magit
|
||||
`(magit-blame-heading ((,class (:background ,jbeans-grey-2 :box ,jbeans-purple-4 :weight bold :foreground ,jbeans-fg))))
|
||||
`(magit-blame-date ((,class (:background ,jbeans-grey-0 :box ,jbeans-green-3 :weight bold :foreground ,jbeans-green-5))))
|
||||
`(magit-blame-name ((,class (:background ,jbeans-grey-0 :box ,jbeans-green-3 :weight bold :foreground ,jbeans-red-0))))
|
||||
`(magit-blame-hash ((,class (:background ,jbeans-grey-0 :box ,jbeans-green-3 :weight bold :foreground ,jbeans-blue-3))))
|
||||
`(magit-bisect-bad ((,class (:foreground ,jbeans-red-6))))
|
||||
`(magit-bisect-good ((,class (:foreground ,jbeans-green-3))))
|
||||
`(magit-bisect-skip ((,class (:foreground ,jbeans-orange-2))))
|
||||
`(magit-blame-summary ((,class (:inherit magit-blame-heading))))
|
||||
`(magit-branch-current ((,class (:inherit magit-branch-local :box 1))))
|
||||
`(magit-branch-local ((,class (:foreground ,jbeans-blue-2))))
|
||||
`(magit-branch-remote ((,class (:foreground ,jbeans-green-5))))
|
||||
`(magit-cherry-equivalent ((,class (:foreground ,jbeans-purple-1))))
|
||||
`(magit-cherry-unmatched ((,class (:foreground ,jbeans-blue-5))))
|
||||
`(magit-diff-added ((,class (:background ,jbeans-green-4 :foreground ,jbeans-green-0))))
|
||||
`(magit-diff-added-highlight ((,class (:background ,jbeans-green-4 :foreground ,jbeans-green-0))))
|
||||
`(magit-diff-base ((,class (:background ,jbeans-green-3 :foreground ,jbeans-yellow-0))))
|
||||
`(magit-diff-base-highlight ((,class (:background ,jbeans-green-3 :foreground ,jbeans-yellow-0))))
|
||||
`(magit-diff-conflict-heading ((,class (:inherit magit-diff-hunk-heading))))
|
||||
`(magit-diff-context ((,class (:background ,jbeans-bg :foreground ,jbeans-fg))))
|
||||
`(magit-diff-context-highlight ((,class (:background ,jbeans-bg :foreground ,jbeans-fg))))
|
||||
`(magit-diff-file-heading ((,class (:foreground ,jbeans-blue-0 :weight bold))))
|
||||
`(magit-diff-file-heading-highlight ((,class (:foreground ,jbeans-blue-0 :weight normal))))
|
||||
`(magit-diff-file-heading-selection ((,class (:background ,jbeans-bg :foreground ,jbeans-fg))))
|
||||
`(magit-diff-hunk-heading ((,class (:background ,jbeans-grey-3 :box ,jbeans-grey-3 :foreground ,jbeans-fg :weight bold))))
|
||||
`(magit-diff-hunk-heading-highlight ((,class (:background ,jbeans-grey-3 :box ,jbeans-grey-7 :weight bold :foreground ,jbeans-fg))))
|
||||
`(magit-diff-hunk-heading-selection ((,class (:inherit magit-diff-hunk-heading-highlight :foreground ,jbeans-red-0))))
|
||||
`(magit-diff-lines-boundary ((,class (:inherit magit-diff-lines-heading))))
|
||||
`(magit-diff-lines-heading ((,class (:inherit magit-diff-hunk-heading-highlight :background ,jbeans-red-6 :foreground ,jbeans-fg))))
|
||||
`(magit-diff-our ((,class (:inherit magit-diff-removed))))
|
||||
`(magit-diff-our-highlight ((,class (:inherit magit-diff-removed-highlight))))
|
||||
`(magit-diff-removed ((,class (:background ,jbeans-red-7 :foreground ,jbeans-red-9))))
|
||||
`(magit-diff-removed-highlight ((,class (:background ,jbeans-red-7 :foreground ,jbeans-red-9))))
|
||||
`(magit-diff-their ((,class (:inherit magit-diff-added))))
|
||||
`(magit-diff-their-highlight ((,class (:inherit magit-diff-added-highlight))))
|
||||
`(magit-diff-whitespace-warning ((,class (:inherit trailing-whitespace))))
|
||||
`(magit-diffstat-added ((,class (:foreground ,jbeans-green-2))))
|
||||
`(magit-diffstat-removed ((,class (:foreground ,jbeans-red-5))))
|
||||
`(magit-dimmed ((,class (:background ,jbeans-bg :foreground ,jbeans-grey-6))))
|
||||
`(magit-filename ((,class (:foreground ,jbeans-orange-2 :weight normal))))
|
||||
`(magit-hash ((,class (:foreground ,jbeans-grey-5))))
|
||||
`(magit-head ((,class (:inherit magit-branch-local))))
|
||||
`(magit-header-line ((,class (:inherit magit-section-heading))))
|
||||
`(magit-log-author ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(magit-log-date ((,class (:foreground ,jbeans-green-5))))
|
||||
`(magit-log-graph ((,class (:foreground ,jbeans-fg))))
|
||||
`(magit-popup-argument ((,class (:inherit font-lock-warning-face))))
|
||||
`(magit-popup-disabled-argument ((,class (:inherit shadow))))
|
||||
`(magit-popup-heading ((,class (:inherit font-lock-keyword-face))))
|
||||
`(magit-popup-key ((,class (:inherit font-lock-builtin-face))))
|
||||
`(magit-popup-option-value ((,class (:inherit font-lock-string-face))))
|
||||
`(magit-process-ng ((,class (:inherit magit-section-heading :foreground ,jbeans-red-8))))
|
||||
`(magit-process-ok ((,class (:inherit magit-section-heading :foreground ,jbeans-green-7))))
|
||||
`(magit-reflog-amend ((,class (:foreground ,jbeans-purple-1))))
|
||||
`(magit-reflog-checkout ((,class (:foreground ,jbeans-blue-5))))
|
||||
`(magit-reflog-cherry-pick ((,class (:foreground ,jbeans-green-7))))
|
||||
`(magit-reflog-commit ((,class (:foreground ,jbeans-green-7))))
|
||||
`(magit-reflog-merge ((,class (:foreground ,jbeans-green-7))))
|
||||
`(magit-reflog-other ((,class (:foreground ,jbeans-blue-5))))
|
||||
`(magit-reflog-rebase ((,class (:foreground ,jbeans-purple-1))))
|
||||
`(magit-reflog-remote ((,class (:foreground ,jbeans-blue-5))))
|
||||
`(magit-reflog-reset ((,class (:foreground ,jbeans-red-8))))
|
||||
`(magit-refname ((,class (:background ,jbeans-bg :foreground ,jbeans-fg))))
|
||||
`(magit-refname-stash ((,class (:inherit magit-refname))))
|
||||
`(magit-refname-wip ((,class (:inherit magit-refname))))
|
||||
`(magit-section-heading ((,class (:background ,jbeans-bg :foreground ,jbeans-yellow-3))))
|
||||
`(magit-section-highlight ((,class (:background ,jbeans-bg))))
|
||||
`(magit-section-secondary-heading ((,class (:background ,jbeans-bg :weight bold))))
|
||||
`(magit-sequence-done ((,class (:inherit magit-hash))))
|
||||
`(magit-sequence-drop ((,class (:foreground ,jbeans-red-5))))
|
||||
`(magit-sequence-head ((,class (:foreground ,jbeans-blue-2))))
|
||||
`(magit-sequence-onto ((,class (:inherit magit-sequence-done))))
|
||||
`(magit-sequence-part ((,class (:foreground ,jbeans-yellow-2))))
|
||||
`(magit-sequence-pick ((,class (:inherit default))))
|
||||
`(magit-sequence-stop ((,class (:foreground ,jbeans-green-1))))
|
||||
`(magit-signature-bad ((,class (:foreground ,jbeans-red-8))))
|
||||
`(magit-signature-good ((,class (:foreground ,jbeans-green-7))))
|
||||
`(magit-signature-untrusted ((,class (:foreground ,jbeans-blue-5))))
|
||||
`(magit-tag ((,class (:foreground ,jbeans-yellow-2))))
|
||||
;;;;; Match
|
||||
`(match ((,class (:background ,jbeans-red-4))))
|
||||
;;;;; Minibuffer
|
||||
`(minibuffer-prompt ((,class (:foreground ,jbeans-yellow-3))))
|
||||
;;;;; Modeline
|
||||
`(mode-line ((,class (:foreground ,jbeans-fg :background ,jbeans-grey-3))))
|
||||
`(mode-line-inactive ((,class (:foreground ,jbeans-grey-6 :background ,jbeans-grey-2))))
|
||||
;;;;; NeoTree
|
||||
`(neo-dir-link-face ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(neo-file-link-face ((,class (:foreground ,jbeans-fg))))
|
||||
;;;;; Org
|
||||
`(org-checkbox ((,class (:foreground ,jbeans-green-5))))
|
||||
`(org-date ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(org-document-title ((,class (:foreground ,jbeans-red-9))))
|
||||
`(org-done ((,class (:foreground ,jbeans-green-2))))
|
||||
`(org-level-1 ((,class (:foreground ,jbeans-orange-0 :weight bold))))
|
||||
`(org-level-2 ((,class (:foreground ,jbeans-green-5 :weight bold))))
|
||||
`(org-level-3 ((,class (:foreground ,jbeans-red-0))))
|
||||
`(org-link ((,class (:foreground ,jbeans-blue-1))))
|
||||
`(org-special-keyword ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(org-table ((,class (:foreground ,jbeans-orange-0))))
|
||||
`(org-todo ((,class (:foreground ,jbeans-red-1))))
|
||||
;;;;; Region
|
||||
`(region ((,class (:background ,jbeans-grey-3))))
|
||||
;;;;; SHM
|
||||
`(shm-current-face ((,class (:background ,jbeans-grey-4))))
|
||||
`(shm-quarantine-face ((,class (:background ,jbeans-red-4))))
|
||||
;;;;; Smerge
|
||||
`(smerge-markers ((,class (:foreground ,jbeans-yellow-3 :background ,jbeans-grey-0))))
|
||||
`(smerge-refined-change ((,class (:foreground ,jbeans-green-5))))
|
||||
;;;;; SmartParens
|
||||
`(sp-pair-overlay-face ((((class color) (min-colors 89)) (:background ,jbeans-grey-2))))
|
||||
`(sp-show-pair-match-face ((((class color) (min-colors 89)) (:background ,jbeans-grey-5))))
|
||||
;;;;; Spaceline
|
||||
`(spaceline-evil-normal ((,class (:foreground ,jbeans-bg :background ,jbeans-orange-2))))
|
||||
`(spaceline-evil-motion ((,class (:foreground ,jbeans-bg :background ,jbeans-purple-2))))
|
||||
`(spaceline-evil-insert ((,class (:foreground ,jbeans-bg :background ,jbeans-green-2))))
|
||||
`(spaceline-evil-visual ((,class (:foreground ,jbeans-bg :background ,jbeans-grey-5))))
|
||||
`(spaceline-evil-replace ((,class (:foreground ,jbeans-bg :background ,jbeans-red-1))))
|
||||
`(spaceline-evil-emacs ((,class (:foreground ,jbeans-bg :background ,jbeans-blue-5))))
|
||||
;;;;; Spacemacs
|
||||
`(spacemacs-normal-face ((,class (:foreground ,jbeans-bg :background ,jbeans-orange-2))))
|
||||
`(spacemacs-motion-face ((,class (:foreground ,jbeans-bg :background ,jbeans-purple-2))))
|
||||
`(spacemacs-insert-face ((,class (:foreground ,jbeans-bg :background ,jbeans-green-2))))
|
||||
`(spacemacs-visual-face ((,class (:foreground ,jbeans-bg :background ,jbeans-grey-5))))
|
||||
`(spacemacs-lisp-face ((,class (:foreground ,jbeans-bg :background ,jbeans-purple-1))))
|
||||
`(spacemacs-replace-face ((,class (:foreground ,jbeans-bg :background ,jbeans-red-1))))
|
||||
`(spacemacs-iedit-face ((,class (:foreground ,jbeans-bg :background ,jbeans-red-8))))
|
||||
`(spacemacs-iedit-insert-face ((,class (:foreground ,jbeans-bg :background ,jbeans-red-8))))
|
||||
`(spacemacs-evilified-face ((,class (:foreground ,jbeans-bg :background ,jbeans-green-3))))
|
||||
`(spacemacs-emacs-face ((,class (:foreground ,jbeans-bg :background ,jbeans-blue-5))))
|
||||
;;;;; TabBar
|
||||
`(tabbar-default ((,class (:inherit variable-pitch :background ,jbeans-bg :foreground ,jbeans-fg :height 0.8))))
|
||||
`(tabbar-modified ((,class (:inherit tabbar-default :foreground ,jbeans-green-5 :box (:line-width 1 :color ,jbeans-grey-5 style: released-button)))))
|
||||
`(tabbar-selected ((,class (:inherit tabbar-default :foreground ,jbeans-blue-0 :box (:line-width 1 :color ,jbeans-fg style: released-button)))))
|
||||
`(tabbar-unselected ((,class (:inherit tabbar-default :box (:line-width 1 :color ,jbeans-grey-6 style: released-button)))))
|
||||
;;;;; Term
|
||||
`(term-color-black ((,class (:foreground ,jbeans-bg :background ,jbeans-bg))))
|
||||
`(term-color-red ((,class (:foreground ,jbeans-red-2 :background ,jbeans-red-3))))
|
||||
`(term-color-green ((,class (:foreground ,jbeans-green-2 :background ,jbeans-green-3))))
|
||||
`(term-color-yellow ((,class (:foreground ,jbeans-yellow-3 :background ,jbeans-yellow-2))))
|
||||
`(term-color-blue ((,class (:foreground ,jbeans-blue-0 :background ,jbeans-blue-1))))
|
||||
`(term-color-magenta ((,class (:foreground ,jbeans-purple-0 :background ,jbeans-purple-3))))
|
||||
`(term-color-white ((,class (:foreground ,jbeans-fg :background ,jbeans-fg))))
|
||||
`(term-default-fg-color ((,class (:inherit term-color-white))))
|
||||
`(term-default-bg-color ((,class (:inherit term-color-black))))
|
||||
;;;;; Whitespace
|
||||
`(trailing-whitespace ((,class (:background ,jbeans-red-4))))
|
||||
;;;;; Vertical border
|
||||
`(vertical-border ((,class (:foreground ,jbeans-grey-3))))
|
||||
;;;;; Web Mode
|
||||
`(web-mode-builtin-face ((,class (:foreground ,jbeans-blue-1))))
|
||||
`(web-mode-html-attr-name-face ((,class (:foreground ,jbeans-blue-0))))
|
||||
`(web-mode-html-tag-face ((,class (:foreground ,jbeans-orange-0))))
|
||||
`(web-mode-symbol-face ((,class (:foreground ,jbeans-blue-3))))
|
||||
`(web-mode-function-name-face ((,class (:foreground ,jbeans-orange-0))))
|
||||
`(web-mode-block-control-face ((,class (:foreground ,jbeans-red-1))))
|
||||
`(web-mode-variable-name-face ((,class (:foreground ,jbeans-blue-2))))
|
||||
;;;;; More Whitespace
|
||||
`(whitespace-trailing ((,class (:background ,jbeans-red-4))))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'jbeans)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; indent-tabs-mode: nil
|
||||
;; eval: (when (require 'rainbow-mode nil t) (rainbow-mode 1))
|
||||
;; End:
|
||||
;;; jbeans-theme.el ends here
|
||||
Reference in New Issue
Block a user