add debugging, fix c-t menu

This commit is contained in:
2025-12-30 10:38:00 -05:00
parent 14577b8e17
commit e4a485f5a1
4 changed files with 6536 additions and 52 deletions

View File

@@ -199,7 +199,6 @@
"workbench.editor.empty.hint": "hidden", "workbench.editor.empty.hint": "hidden",
"chat.agent.enabled": false, "chat.agent.enabled": false,
"chat.disableAIFeatures": true, "chat.disableAIFeatures": true,
"workbench.colorTheme": "Default Light+",
"workbench.preferredDarkColorTheme": "Visual Studio Dark", "workbench.preferredDarkColorTheme": "Visual Studio Dark",
"workbench.preferredLightColorTheme": "Visual Studio Light" "workbench.preferredLightColorTheme": "Visual Studio Light"
} }

View File

@@ -38,6 +38,9 @@
;; Search ;; Search
(require 'xah-find) (require 'xah-find)
;; Debugging
(require 'dape)
;;; ============================================================================ ;;; ============================================================================
;;; MODE ASSOCIATIONS ;;; MODE ASSOCIATIONS
;;; ============================================================================ ;;; ============================================================================
@@ -99,38 +102,84 @@
(advice-add 'y-or-n-p :around #'my-auto-confirm-modified-buffer) (advice-add 'y-or-n-p :around #'my-auto-confirm-modified-buffer)
(defun my-lsp-find-workspace-symbol () (defun my-lsp-find-workspace-symbol ()
"Interactively search for symbols in workspace using LSP." "Interactively search for symbols in workspace using LSP.
Start typing to search - LSP provides fuzzy matching."
(interactive) (interactive)
(if (eglot-managed-p) (if (eglot-managed-p)
(let* ((server (eglot-current-server)) (let* ((server (eglot-current-server))
(root (project-root (project-current))) (root (project-root (project-current)))
(query (read-string "Symbol query: ")) (all-candidates '())
(resp (jsonrpc-request server :workspace/symbol `(:query ,query))) (completion-styles '(orderless basic))
(items (append resp nil)) (completion-ignore-case t)
(candidates (collection
(delq nil (lambda (string pred action)
(mapcar (lambda (item) (when (and (> (length string) 0) (not (eq action 'metadata)))
(condition-case nil (let* ((resp (jsonrpc-request server :workspace/symbol `(:query ,string)))
(let* ((name (plist-get item :name)) (items (append resp nil)))
(loc (plist-get item :location)) (dolist (item items)
(uri (plist-get loc :uri)) (condition-case nil
(range (plist-get loc :range)) (let* ((name (plist-get item :name))
(start (plist-get range :start)) (loc (plist-get item :location))
(line (1+ (plist-get start :line))) (uri (plist-get loc :uri))
(file (eglot-uri-to-path uri)) (range (plist-get loc :range))
(rel-path (file-relative-name file root))) (start (plist-get range :start))
(propertize (format "%s %s:%d" name rel-path line) (line (plist-get start :line))
'file file (char (plist-get start :character))
'line line)) (file (eglot-uri-to-path uri))
(error nil))) (rel-path (file-relative-name file root))
items))) (display (format "%s %s:%d" name rel-path (1+ line))))
(candidate (completing-read "Symbol: " candidates nil t))) (unless (seq-find (lambda (c) (string= (car c) display)) all-candidates)
(when (and candidate (get-text-property 0 'file candidate)) (push (list display file line char) all-candidates)))
(find-file (get-text-property 0 'file candidate)) (error nil)))))
;; Sort by symbol name length (shorter first)
(let ((strings (mapcar #'car
(sort (copy-sequence all-candidates)
(lambda (a b)
(< (length (car (split-string (car a) " ")))
(length (car (split-string (car b) " ")))))))))
(complete-with-action action strings string pred))))
(selection (completing-read "Symbol (type to search): " collection nil t)))
(when-let ((match (seq-find (lambda (c) (string= (car c) selection)) all-candidates)))
(find-file (nth 1 match))
(goto-char (point-min)) (goto-char (point-min))
(forward-line (1- (get-text-property 0 'line candidate))))) (forward-line (nth 2 match))
(forward-char (or (nth 3 match) 0))))
(call-interactively 'xref-find-apropos))) (call-interactively 'xref-find-apropos)))
;;; ============================================================================
;;; DAPE (DEBUGGING)
;;; ============================================================================
;; Go debugging with dlv (requires: go install github.com/go-delve/delve/cmd/dlv@latest)
;; Use M-x dape or F5 to start debugging, select "dlv" configuration
;; Show inlay hints for variable values while debugging
(setq dape-inlay-hints t)
;; Save buffers before starting debug session
(add-hook 'dape-start-hook (lambda () (save-some-buffers t t)))
;; Kill debug session before quitting Emacs
(add-hook 'kill-emacs-hook
(lambda ()
(ignore-errors (dape-quit))
;; Also kill any lingering dlv processes
(dolist (proc (process-list))
(when (and (process-live-p proc)
(string-match-p "\\(dape\\|dlv\\)" (process-name proc)))
(ignore-errors
(let ((pid (process-id proc)))
(when pid (my-kill-process-tree pid)))
(delete-process proc))))))
(defun my-dape-start-or-continue ()
"Start debugging or continue if already in a debug session.
If stopped at a breakpoint, continue. Otherwise start a new debug session."
(interactive)
(if-let ((conn (dape--live-connection 'stopped t)))
(dape-continue conn)
(call-interactively #'dape)))
;;; ============================================================================ ;;; ============================================================================
;;; FLYMAKE & DIAGNOSTICS ;;; FLYMAKE & DIAGNOSTICS
;;; ============================================================================ ;;; ============================================================================
@@ -258,6 +307,7 @@
(global-auto-revert-mode t) (global-auto-revert-mode t)
(global-so-long-mode 1) (global-so-long-mode 1)
(global-hl-line-mode -1) (global-hl-line-mode -1)
(setq enable-local-variables :all) ; trust .dir-locals.el files
;; display ;; display
(setq-default truncate-lines 1) (setq-default truncate-lines 1)
@@ -275,7 +325,6 @@
(setq-default require-final-newline t) (setq-default require-final-newline t)
(setq ediff-split-window-function 'split-window-horizontally) (setq ediff-split-window-function 'split-window-horizontally)
(setq dired-dnd-protocol-alist nil) (setq dired-dnd-protocol-alist nil)
(setq custom-file "~/.emacs.d/custom.el")
;; mouse - disable right-click context menu ;; mouse - disable right-click context menu
(global-set-key [mouse-3] 'ignore) (global-set-key [mouse-3] 'ignore)
@@ -317,20 +366,19 @@
(progn (progn
(set-window-buffer window buffer) (set-window-buffer window buffer)
window) window)
(let ((new-window (display-buffer-at-bottom buffer alist))) (display-buffer-in-side-window buffer
(when new-window '((side . bottom)
(with-selected-window new-window (slot . 1)
(set-window-parameter new-window 'window-height 0.25))) (window-height . 0.25))))))
new-window))))
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("\\*compilation\\*" (my-display-in-bottom-panel) (window-height . 0.25))) '("\\*compilation\\*" (my-display-in-bottom-panel) (side . bottom) (slot . 1) (window-height . 0.25)))
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("\\*xref\\*" (my-display-in-bottom-panel) (window-height . 0.25))) '("\\*xref\\*" (my-display-in-bottom-panel) (side . bottom) (slot . 1) (window-height . 0.25)))
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("\\*Flymake diagnostics.*\\*" (my-display-in-bottom-panel) (window-height . 0.25))) '("\\*Flymake diagnostics.*\\*" (my-display-in-bottom-panel) (side . bottom) (slot . 1) (window-height . 0.25)))
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("\\*grep\\*" (my-display-in-bottom-panel) (window-height . 0.25))) '("\\*grep\\*" (my-display-in-bottom-panel) (side . bottom) (slot . 1) (window-height . 0.25)))
(defun my-bottom-panel-toggle () (defun my-bottom-panel-toggle ()
"Toggle the bottom panel. Close if visible, open if hidden." "Toggle the bottom panel. Close if visible, open if hidden."
@@ -433,7 +481,7 @@
(global-set-key (kbd "C-<next>") 'next-multiframe-window) (global-set-key (kbd "C-<next>") 'next-multiframe-window)
(global-set-key (kbd "C-1") 'my-select-left-pane) (global-set-key (kbd "C-1") 'my-select-left-pane)
(global-set-key (kbd "C-2") 'my-select-right-pane) (global-set-key (kbd "C-2") 'my-select-right-pane)
(global-set-key (kbd "<f11>") 'toggle-frame-maximized) (global-set-key (kbd "M-<f11>") 'toggle-frame-maximized)
;; --- Selection & Editing --- ;; --- Selection & Editing ---
(global-set-key (kbd "C-a") 'mark-whole-buffer) (global-set-key (kbd "C-a") 'mark-whole-buffer)
@@ -454,7 +502,7 @@
(global-set-key (kbd "<end>") 'move-end-of-line) (global-set-key (kbd "<end>") 'move-end-of-line)
(global-set-key (kbd "M-p") 'backward-paragraph) (global-set-key (kbd "M-p") 'backward-paragraph)
(global-set-key (kbd "M-n") 'forward-paragraph) (global-set-key (kbd "M-n") 'forward-paragraph)
(global-set-key [f8] 'goto-line) (global-set-key (kbd "C-S-g") 'goto-line)
(when (eq system-type 'darwin) (when (eq system-type 'darwin)
(global-set-key (kbd "C-<left>") 'my-smart-home) (global-set-key (kbd "C-<left>") 'my-smart-home)
(global-set-key (kbd "C-<right>") 'move-end-of-line)) (global-set-key (kbd "C-<right>") 'move-end-of-line))
@@ -472,7 +520,8 @@
;; --- Code Navigation (xref/LSP) --- ;; --- Code Navigation (xref/LSP) ---
(global-set-key (kbd "<f12>") 'my-xref-find-definitions-same-pane) (global-set-key (kbd "<f12>") 'my-xref-find-definitions-same-pane)
(global-set-key (kbd "C-<f12>") 'xref-find-references) (global-set-key (kbd "C-<f12>") 'my-xref-find-definitions-right-pane)
(global-set-key (kbd "C-S-<f12>") 'xref-find-references)
(global-set-key (kbd "C-{") 'xref-go-back) (global-set-key (kbd "C-{") 'xref-go-back)
(global-set-key (kbd "C-}") 'xref-go-forward) (global-set-key (kbd "C-}") 'xref-go-forward)
(global-set-key (kbd "<mouse-3>") 'xref-go-back) (global-set-key (kbd "<mouse-3>") 'xref-go-back)
@@ -488,8 +537,21 @@
;; --- Compilation & Build --- ;; --- Compilation & Build ---
(global-set-key (kbd "<f1>") 'my-bottom-panel-toggle) (global-set-key (kbd "<f1>") 'my-bottom-panel-toggle)
(global-set-key (kbd "<f5>") 'my-compile-last) (global-set-key (kbd "<f4>") 'next-error)
(global-set-key (kbd "<C-S-f5>") 'my-compile-custom) (global-set-key (kbd "S-<f4>") 'previous-error)
(global-set-key (kbd "C-b") 'my-compile-last)
(global-set-key (kbd "C-S-b") 'my-compile-custom)
;; --- Debugging (dape, VS Code-style) ---
(global-set-key (kbd "<f5>") 'my-dape-start-or-continue)
(global-set-key (kbd "S-<f5>") 'dape-quit)
(global-set-key (kbd "C-S-<f5>") 'dape-restart)
(global-set-key (kbd "<f9>") 'dape-breakpoint-toggle)
(global-set-key (kbd "<f10>") 'dape-next)
(global-set-key (kbd "<f11>") 'dape-step-in)
(global-set-key (kbd "S-<f11>") 'dape-step-out)
(global-set-key (kbd "S-<f9>") 'dape-breakpoint-remove-all)
(global-set-key (kbd "C-<f5>") 'dape-continue)
;; --- External Tools --- ;; --- External Tools ---
(global-set-key (kbd "<f6>") 'my-file-manager-command) (global-set-key (kbd "<f6>") 'my-file-manager-command)
@@ -499,10 +561,6 @@
(global-set-key (kbd "<f7>") 'project-switch-project) (global-set-key (kbd "<f7>") 'project-switch-project)
(global-set-key (kbd "C-S-p") 'execute-extended-command) (global-set-key (kbd "C-S-p") 'execute-extended-command)
;; --- Bookmarks ---
(global-set-key (kbd "<f9>") 'bookmark-jump)
(global-set-key (kbd "<f10>") 'bookmark-set)
;; --- Themes --- ;; --- Themes ---
(global-set-key (kbd "<f3>") 'my-select-theme) (global-set-key (kbd "<f3>") 'my-select-theme)
@@ -531,11 +589,14 @@
(global-set-key (kbd "M-<delete>") 'my-delete-word) (global-set-key (kbd "M-<delete>") 'my-delete-word)
(global-set-key (kbd "C-<backspace>") 'my-backward-delete-word) (global-set-key (kbd "C-<backspace>") 'my-backward-delete-word)
;; --- Macros ---
(global-set-key (kbd "C-S-r") 'my-toggle-macro-recording)
(global-set-key (kbd "C-M-r") 'my-call-macro)
;; --- Misc --- ;; --- Misc ---
(global-set-key (kbd "C-e") 'my-copy-path-with-line) (global-set-key (kbd "C-e") 'my-select-inside-parens)
(global-set-key (kbd "C-y") 'my-copy-path-with-line)
(global-set-key (kbd "C-!") 'my-insert-shell-command-output) (global-set-key (kbd "C-!") 'my-insert-shell-command-output)
(global-set-key (kbd "C-<f4>") 'my-toggle-macro-recording)
(global-set-key (kbd "<f4>") 'my-call-macro)
;; --- Minibuffer Keybindings --- ;; --- Minibuffer Keybindings ---
(define-key minibuffer-local-filename-completion-map (kbd "C-2") 'my-find-file-right-pane) (define-key minibuffer-local-filename-completion-map (kbd "C-2") 'my-find-file-right-pane)
@@ -598,11 +659,12 @@
(move-beginning-of-line 1)))) (move-beginning-of-line 1))))
(defun my-get-top-windows () (defun my-get-top-windows ()
"Get windows in the top portion of the frame (not bottom compilation)." "Get windows in the top portion of the frame (not bottom compilation or dape)."
(let ((windows '())) (let ((windows '()))
(walk-windows (walk-windows
(lambda (w) (lambda (w)
(when (window-at-side-p w 'top) (when (and (window-at-side-p w 'top)
(not (string-prefix-p "*dape-" (buffer-name (window-buffer w)))))
(push w windows)))) (push w windows))))
(sort windows (lambda (a b) (< (car (window-edges a)) (car (window-edges b))))))) (sort windows (lambda (a b) (< (car (window-edges a)) (car (window-edges b)))))))
@@ -638,6 +700,22 @@ Falls back to dumb-jump if xref fails."
(dumb-jump-go))) (dumb-jump-go)))
(error (dumb-jump-go)))))) (error (dumb-jump-go))))))
(defun my-xref-find-definitions-right-pane ()
"Find definition and show it in a new pane split to the right.
Falls back to dumb-jump if xref fails."
(interactive)
(let ((identifier (thing-at-point 'symbol t)))
(if (null identifier)
(message "No symbol at point")
(split-window-right)
(other-window 1)
(condition-case nil
(let ((xrefs (xref-backend-definitions (xref-find-backend) identifier)))
(if xrefs
(xref-find-definitions identifier)
(dumb-jump-go)))
(error (dumb-jump-go))))))
(defun my-xref-find-definitions-at-click (event) (defun my-xref-find-definitions-at-click (event)
"Find definition of the symbol clicked on." "Find definition of the symbol clicked on."
(interactive "e") (interactive "e")
@@ -867,6 +945,20 @@ Respects search settings: regexp, whole-word, case-sensitivity."
(set-mark (point)) (set-mark (point))
(forward-line 1))) (forward-line 1)))
(defun my-select-inside-parens ()
"Select the contents inside the nearest enclosing parentheses, brackets, or braces."
(interactive)
(let ((start nil) (end nil))
(save-excursion
(ignore-errors
(up-list -1 t t) ; go backward, escape strings, no syntax crossing
(setq start (1+ (point)))
(forward-sexp 1)
(setq end (1- (point)))))
(when (and start end)
(goto-char start)
(set-mark end))))
(defun my-toggle-comment () (defun my-toggle-comment ()
"Toggle comment on line or region without moving point." "Toggle comment on line or region without moving point."
(interactive) (interactive)
@@ -1002,6 +1094,7 @@ Does not copy to kill ring."
(defun my-compile-custom () (defun my-compile-custom ()
"Run a custom compile command in the project root." "Run a custom compile command in the project root."
(interactive) (interactive)
(save-some-buffers t t)
(let* ((default-directory (project-root (project-current t))) (let* ((default-directory (project-root (project-current t)))
(saved (my-compile-get-saved-command)) (saved (my-compile-get-saved-command))
(cmd (read-string "Command: " saved))) (cmd (read-string "Command: " saved)))
@@ -1011,6 +1104,7 @@ Does not copy to kill ring."
(defun my-compile-last () (defun my-compile-last ()
"Run last compile command, or prompt for one if none has been run." "Run last compile command, or prompt for one if none has been run."
(interactive) (interactive)
(save-some-buffers t t)
(let* ((default-directory (project-root (project-current t))) (let* ((default-directory (project-root (project-current t)))
(cmd (my-compile-get-saved-command))) (cmd (my-compile-get-saved-command)))
(if cmd (if cmd
@@ -1228,9 +1322,9 @@ Does not copy to kill ring."
(if defining-kbd-macro (if defining-kbd-macro
(progn (progn
(kmacro-end-macro nil) (kmacro-end-macro nil)
(message "Macro recorded. Press F4 to replay.")) (message "Macro recorded. Press C-M-r to replay."))
(kmacro-start-macro nil) (kmacro-start-macro nil)
(message "Recording macro... Press C-<f4> to stop."))) (message "Recording macro... Press C-S-r to stop.")))
(defun my-call-macro () (defun my-call-macro ()
"Call last macro. If region is active, run macro N times where N is number of selected lines. "Call last macro. If region is active, run macro N times where N is number of selected lines.
@@ -1280,6 +1374,27 @@ Use in `isearch-mode-end-hook'."
;; (set-face-attribute 'default nil :font "Consolas-15") ;; (set-face-attribute 'default nil :font "Consolas-15")
;; Disable current theme before loading to prevent stacking on config reload
(when my-current-theme
(disable-theme my-current-theme))
(setq my-current-theme 'bedroom)
(load-theme 'bedroom t) (load-theme 'bedroom t)
;;; ============================================================================
;;; CUSTOM
;;; ============================================================================
(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-directories '("/Users/mta/projects/cdrateline.com_2.0/")))
(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.
)
;;; init.el ends here ;;; init.el ends here

5858
.emacs.d/lisp/dape.el Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,512 @@
;;; acme-theme.el --- A color theme based on Acme & Sam from Plan 9 -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Ian Yi-En Pan
;; Author: Ian Y.E. Pan
;; URL: https://github.com/ianpan870102/acme-emacs-theme
;; Version: 1.0.0
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;; A color theme for Emacs based on Acme & Sam from Plan 9
;;; Credits:
;; This theme was modified from John Louis Del Rosario's plan9-theme.el
;;; Code:
(defgroup acme-theme nil
"Options for acme theme."
:group 'faces)
(defcustom acme-theme-black-fg nil
"If non-nil, foreground will be pure black instead of the default dark grey."
:group 'acme-theme
:type 'boolean)
(deftheme acme "A color theme based on Acme & Sam")
;;; Color palette
(let ((class '((class color) (min-colors 89)))
(bg "#FFFFE8") ; default bg
(bg-alt "#EFEFD8")
(bg-dark "#E5E5D0")
(fg (if acme-theme-black-fg "#000000" "#444444")) ; default fg
(fg-alt "#B8B09A")
(fg-dark "#988D6D")
(fg-light "#CCCCB7")
(highlight "#E8EB98")
(highlight-alt "#E8EBC8")
;; Standardized palette
(acme-cyan "#007777")
(acme-cyan-light "#A8EFEB")
(acme-red "#880000")
(acme-red-light "#F8E8E8")
(acme-yellow "#888838")
(acme-yellow-light "#F8FCE8")
(acme-green "#005500")
(acme-green-alt "#006600")
(acme-green-light "#E8FCE8")
(acme-blue "#1054AF")
(acme-blue-light "#E1FAFF")
(acme-purple "#555599")
(acme-purple-light "#FFEAFF"))
;;; Theme Faces
(custom-theme-set-faces
'acme
;;;; Built-in
;;;;; basic coloring
`(button ((t (:underline t))))
`(link ((t (:foreground "#0066cc":weight normal))))
`(highlight ((t (:inherit link :underline t)))) ; link hover
`(link-visited ((t (:foreground ,acme-purple :underline t :weight normal))))
`(default ((t (:foreground ,fg :background ,bg))))
`(cursor ((t (:foreground ,bg :background ,fg))))
`(escape-glyph ((t (:foreground ,acme-cyan-light :bold nil))))
`(fringe ((t (:foreground ,fg :background ,bg))))
`(line-number ((t (:foreground ,fg :background ,bg-alt))))
`(line-number-current-line ((t (:foreground ,fg :background ,bg-alt))))
`(header-line ((t (:foreground ,fg :background ,acme-blue-light :box t))))
`(success ((t (:foreground ,acme-green :weight normal))))
`(warning ((t (:foreground ,acme-red :weight normal))))
`(error ((t (:foreground ,acme-red :bold t))))
;;;;; compilation
`(compilation-column-face ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
`(compilation-column-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
`(compilation-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
`(compilation-face ((t (:foreground ,fg))))
`(compilation-info-face ((t (:foreground ,acme-blue))))
`(compilation-info ((t (:foreground ,acme-blue :underline t))))
`(compilation-line-face ((t (:foreground ,acme-purple))))
`(compilation-line-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
`(compilation-message-face ((t (:foreground ,acme-blue))))
`(compilation-warning-face ((t (:foreground ,acme-yellow :weight normal :underline t))))
`(compilation-mode-line-exit ((t (:foreground ,acme-cyan :weight normal))))
`(compilation-mode-line-fail ((t (:foreground ,acme-red :weight normal))))
`(compilation-mode-line-run ((t (:foreground ,acme-purple :weight normal))))
;;;;; grep
`(grep-context-face ((t (:foreground ,fg-alt))))
`(grep-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
`(grep-hit-face ((t (:foreground ,acme-purple :weight normal))))
`(grep-match-face ((t (:foreground ,acme-cyan :weight normal))))
`(match ((t (:background ,acme-cyan :foreground ,acme-cyan-light))))
;;;;; ag
`(ag-hit-face ((t (:foreground ,acme-green :weight normal))))
`(ag-match-face ((t (:foreground ,acme-cyan :background ,acme-cyan-light :weight normal))))
;;;;; isearch
`(isearch ((t (:foreground ,fg :weight normal :background ,acme-cyan-light))))
`(isearch-fail ((t (:foreground ,fg :weight normal :background ,acme-red))))
`(lazy-highlight ((t (:foreground ,fg :weight normal :background ,acme-blue-light))))
`(menu ((t (:foreground ,bg :background ,fg))))
`(minibuffer-prompt ((t (:foreground ,fg :weight normal))))
`(region ((,class (:foreground ,fg :background ,highlight :extend nil))))
`(secondary-selection ((t (:background ,acme-green-light))))
`(trailing-whitespace ((t (:background ,acme-red-light))))
`(vertical-border ((t (:foreground ,acme-cyan))))
;;;;; font lock
`(font-lock-builtin-face ((t (:foreground ,fg :weight normal))))
`(font-lock-function-name-face ((t (:foreground ,fg :weight normal))))
`(font-lock-string-face ((t (:foreground ,acme-red))))
`(font-lock-keyword-face ((t (:foreground ,acme-blue :weight bold)))) ; if, else, for, while, return...
`(font-lock-type-face ((t (:foreground ,fg :weight bold)))) ; int, float, string, void...
`(font-lock-constant-face ((t (:foreground ,fg :weight bold)))) ; NULL, nullptr, true, false...
`(font-lock-variable-name-face ((t (:foreground ,fg :weight normal))))
`(font-lock-comment-face ((t (:foreground ,acme-green :italic nil))))
`(font-lock-comment-delimiter-face ((t (:foreground ,acme-green :italic nil))))
`(font-lock-doc-face ((t (:foreground ,acme-yellow :italic nil))))
`(font-lock-negation-char-face ((t (:foreground ,acme-red :weight normal))))
`(font-lock-preprocessor-face ((t (:foreground ,acme-red :weight normal))))
`(font-lock-regexp-grouping-construct ((t (:foreground ,acme-purple :weight normal))))
`(font-lock-regexp-grouping-backslash ((t (:foreground ,acme-purple :weight normal))))
`(font-lock-warning-face ((t (:foreground ,acme-red :weight normal))))
;;;;; table
`(table-cell ((t (:background ,bg-alt))))
;;;;; ledger
`(ledger-font-directive-face ((t (:foreground ,acme-cyan))))
`(ledger-font-periodic-xact-face ((t (:inherit ledger-font-directive-face))))
`(ledger-font-posting-account-face ((t (:foreground ,acme-blue))))
`(ledger-font-posting-amount-face ((t (:foreground ,acme-red))))
`(ledger-font-posting-date-face ((t (:foreground ,acme-red :weight normal))))
`(ledger-font-payee-uncleared-face ((t (:foreground ,acme-purple))))
`(ledger-font-payee-cleared-face ((t (:foreground ,fg))))
`(ledger-font-payee-pending-face ((t (:foreground ,acme-yellow))))
`(ledger-font-xact-highlight-face ((t (:background ,bg-alt))))
;;;; Third-party
;;;;; anzu
`(anzu-mode-line ((t (:foreground ,acme-yellow :background ,acme-yellow-light :weight normal))))
;;;;; clojure-mode
`(clojure-interop-method-face ((t (:inherit font-lock-function-name-face))))
;;;;; clojure-test-mode
`(clojure-test-failure-face ((t (:foreground ,acme-red :weight normal :underline t))))
`(clojure-test-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
`(clojure-test-success-face ((t (:foreground ,acme-green :weight normal :underline t))))
;;;;; diff
`(diff-added ((,class (:foreground ,fg :background ,acme-green-light))
(t (:foreground ,fg :background ,acme-green-light))))
`(diff-changed ((t (:foreground ,acme-yellow))))
`(diff-context ((t (:foreground ,fg))))
`(diff-removed ((,class (:foreground ,fg :background ,acme-red-light))
(t (:foreground ,fg :background ,acme-red-light))))
`(diff-refine-added ((t :inherit diff-added :background ,acme-green-light :weight bold :underline t)))
`(diff-refine-change ((t :inherit diff-changed :weight normal)))
`(diff-refine-removed ((t :inherit diff-removed :background ,acme-red-light :weight bold :underline t)))
`(diff-header ((,class (:foreground ,fg :weight normal))
(t (:foreground ,acme-purple-light :weight normal))))
`(diff-file-header ((,class (:foreground ,fg :background ,acme-cyan-light :weight normal))
(t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
`(diff-hunk-header ((,class (:foreground ,acme-green :weight normal))
(t (:foreground ,acme-green :weight normal))))
;;;;; dired/dired+/dired-subtree
`(dired-directory ((t (:foreground ,acme-blue :weight bold))))
`(diredp-display-msg ((t (:foreground ,acme-blue))))
`(diredp-compressed-file-suffix ((t (:foreground ,acme-purple))))
`(diredp-date-time ((t (:foreground ,acme-green))))
`(diredp-deletion ((t (:foreground ,acme-red))))
`(diredp-deletion-file-name ((t (:foreground ,acme-red))))
`(diredp-dir-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight bold))))
`(diredp-dir-priv ((t (:foreground ,acme-blue))))
`(diredp-exec-priv ((t (:foreground ,acme-yellow))))
`(diredp-executable-tag ((t (:foreground ,acme-yellow))))
`(diredp-file-name ((t (:foreground ,fg))))
`(diredp-file-suffix ((t (:foreground ,acme-yellow))))
`(diredp-flag-mark ((t (:foreground ,acme-cyan))))
`(diredp-flag-mark-line ((t (:foreground ,acme-cyan))))
`(diredp-ignored-file-name ((t (:foreground ,fg-light))))
`(diredp-link-priv ((t (:foreground ,acme-purple))))
`(diredp-mode-line-flagged ((t (:foreground ,acme-yellow))))
`(diredp-mode-line-marked ((t (:foreground ,acme-yellow))))
`(diredp-no-priv ((t (:foreground ,fg))))
`(diredp-number ((t (:foreground ,acme-blue))))
`(diredp-other-priv ((t (:foreground ,fg))))
`(diredp-rare-priv ((t (:foreground ,fg))))
`(diredp-read-priv ((t (:foreground ,fg))))
`(diredp-symlink ((t (:foreground ,fg :background ,acme-blue-light))))
`(diredp-write-priv ((t (:foreground ,fg))))
`(diredp-dir-name ((t (:foreground ,acme-blue :weight bold))))
`(dired-subtree-depth-1-face ((t (:background ,bg))))
`(dired-subtree-depth-2-face ((t (:background ,bg))))
`(dired-subtree-depth-3-face ((t (:background ,bg))))
;;;;; elfeed
`(elfeed-search-date-face ((t (:foreground ,acme-blue))))
`(elfeed-search-title-face ((t (:foreground ,fg))))
`(elfeed-search-unread-title-face ((t (:foreground ,fg))))
`(elfeed-search-feed-face ((t (:foreground ,acme-green))))
`(elfeed-search-tag-face ((t (:foreground ,acme-red))))
`(elfeed-search-unread-count-face ((t (:foreground ,fg))))
;;;;; erc
`(erc-default-face ((t (:foreground ,fg))))
`(erc-header-line ((t (:inherit header-line))))
`(erc-action-face ((t (:inherit erc-default-face))))
`(erc-bold-face ((t (:inherit erc-default-face :weight normal))))
`(erc-underline-face ((t (:underline t))))
`(erc-error-face ((t (:inherit font-lock-warning-face))))
`(erc-prompt-face ((t (:foreground ,acme-green :background ,acme-green-light :weight normal))))
`(erc-timestamp-face ((t (:foreground ,acme-green :background ,acme-green-light))))
`(erc-direct-msg-face ((t (:inherit erc-default))))
`(erc-notice-face ((t (:foreground ,fg-light))))
`(erc-highlight-face ((t (:background ,highlight))))
`(erc-input-face ((t (:foreground ,fg :background ,bg-alt))))
`(erc-current-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal
:box (:line-width 1 :style released-button)))))
`(erc-nick-default-face ((t (:weight normal :background ,bg-alt))))
`(erc-my-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal
:box (:line-width 1 :style released-button)))))
`(erc-nick-msg-face ((t (:inherit erc-default))))
`(erc-fool-face ((t (:inherit erc-default))))
`(erc-pal-face ((t (:foreground ,acme-purple :weight normal))))
`(erc-dangerous-host-face ((t (:inherit font-lock-warning-face))))
`(erc-keyword-face ((t (:foreground ,acme-yellow :weight normal))))
;;;;; evil
`(evil-search-highlight-persist-highlight-face ((t (:inherit lazy-highlight))))
;;;;; flx
`(flx-highlight-face ((t (:foreground ,acme-yellow :background ,acme-green-light
:weight normal :underline t))))
;;;;; company
`(company-tooltip ((t (:background ,acme-blue-light))))
`(company-tooltip-selection ((t (:background ,acme-cyan-light))))
`(company-tooltip-common ((t (:foreground ,acme-blue :bold t))))
`(company-tooltip-annotation ((t (:foreground ,acme-yellow :italic t)))) ; parameter hints etc.
`(company-scrollbar-fg ((t (:background ,acme-cyan))))
`(company-scrollbar-bg ((t (:background ,acme-cyan-light))))
`(company-preview-common ((t (:foreground ,fg :background ,acme-cyan-light))))
;;;;; highlight-symbol
`(highlight-symbol-face ((t (:background ,bg-alt))))
;;;;; highlight-numbers
`(highlight-numbers-number ((t (:foreground ,acme-blue))))
;;;;; highlight-operators
`(highlight-operators-face ((t (:foreground ,fg))))
;;;;; hl-todo
`(hl-todo ((t (:inverse-video t))))
;;;;; hl-line-mode
`(hl-line ((,class (:background ,bg-alt))))
;;;;; hl-sexp
`(hl-sexp-face ((,class (:background ,bg-alt))))
;;;;; ido-mode
`(ido-first-match ((t (:foreground ,fg :weight normal))))
`(ido-only-match ((t (:foreground ,fg :weight normal))))
`(ido-subdir ((t (:foreground ,acme-blue))))
`(ido-indicator ((t (:foreground ,acme-yellow))))
;;;;; ido-vertical
`(ido-vertical-first-match-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
`(ido-vertical-only-match-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
`(ido-vertical-match-face ((t (:foreground ,fg :background ,acme-green-light
:weight normal :underline t))))
;;;;; indent-guide
`(indent-guide-face ((t (:foreground ,highlight))))
;;;;; ivy
`(ivy-current-match ((t (:background ,acme-blue-light :underline t :extend t))))
`(ivy-minibuffer-match-face-1 ((t (:background ,bg-alt))))
`(ivy-minibuffer-match-face-2 ((t (:background ,acme-cyan-light))))
`(ivy-minibuffer-match-face-3 ((t (:background ,acme-purple-light))))
`(ivy-minibuffer-match-face-3 ((t (:background ,acme-blue-light))))
;;;;; js2-mode
`(js2-warning ((t (:underline ,acme-yellow))))
`(js2-error ((t (:foreground ,acme-red :weight normal))))
`(js2-jsdoc-tag ((t (:foreground ,acme-purple))))
`(js2-jsdoc-type ((t (:foreground ,acme-blue))))
`(js2-jsdoc-value ((t (:foreground ,acme-cyan))))
`(js2-function-param ((t (:foreground ,fg))))
`(js2-external-variable ((t (:foreground ,acme-cyan))))
;;;;; linum-mode
`(linum ((t (:foreground ,fg-light))))
;;;;; lsp-mode
`(lsp-face-highlight-textual ((t (:background ,bg-dark))))
`(lsp-face-highlight-read ((t (:background ,acme-purple-light))))
`(lsp-face-highlight-write ((t (:background ,acme-green-light))))
;;;;; magit
`(magit-section-heading ((t (:foreground ,acme-cyan :background ,acme-blue-light
:weight normal :underline t))))
`(magit-section-highlight ((t (:background ,bg-alt))))
`(magit-section-heading-selection ((t (:background ,highlight))))
`(magit-filename ((t (:foreground ,fg))))
`(magit-hash ((t (:foreground ,acme-yellow :weight normal))))
`(magit-tag ((t (:foreground ,acme-purple :weight normal))))
`(magit-refname ((t (:foreground ,acme-purple :weight normal))))
`(magit-head ((t (:foreground ,acme-green :weight normal))))
`(magit-branch-local ((t (:foreground ,acme-blue :background ,acme-blue-light
:weight normal))))
`(magit-branch-remote ((t (:foreground ,acme-green :background ,acme-green-light
:weight normal))))
`(magit-branch-current ((t (:foreground ,acme-cyan :background ,acme-cyan-light
:weight normal
:box (:line-width 1 :color ,acme-cyan)))))
`(magit-diff-file-heading ((t (:foreground ,fg :weight normal))))
`(magit-diff-file-heading-highlight ((t (:background ,bg-alt))))
`(magit-diff-file-heading-selection ((t (:foreground ,acme-red :background ,highlight))))
`(magit-diff-hunk-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight normal :underline t))))
`(magit-diff-hunk-heading-highlight ((t (:background ,acme-cyan-light))))
`(magit-diff-added ((t (:foreground ,acme-green :background ,acme-green-light))))
`(magit-diff-removed ((t (:foreground ,acme-red :background ,acme-red-light))))
`(magit-diff-context ((t (:foreground ,fg-dark :background nil))))
`(magit-diff-added-highlight ((t (:foreground ,acme-green :background ,acme-green-light))))
`(magit-diff-removed-highlight ((t (:foreground ,acme-red :background ,acme-red-light))))
`(magit-diff-context-highlight ((t (:foreground ,fg-dark :background ,bg-alt))))
`(magit-diffstat-added ((t (:foreground ,acme-green :background ,acme-green-light :weight normal))))
`(magit-diffstat-removed ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
`(magit-log-author ((t (:foreground ,acme-blue :weight normal))))
`(magit-log-date ((t (:foreground ,acme-purple :weight normal))))
`(magit-log-graph ((t (:foreground ,acme-red :weight normal))))
`(magit-blame-heading ((t (:foreground ,fg-dark :background ,bg-alt))))
;;;;; paren-face
`(parenthesis ((t (:foreground "#CCCCB7"))))
;;;;; project-explorer
`(pe/file-face ((t (:foreground ,fg))))
`(pe/directory-face ((t (:foreground ,acme-blue :weight normal))))
;;;;; rainbow-delimiters
`(rainbow-delimiters-depth-1-face ((t (:foreground ,acme-green))))
`(rainbow-delimiters-depth-2-face ((t (:foreground ,acme-blue))))
`(rainbow-delimiters-depth-3-face ((t (:foreground ,acme-red))))
;;;;; show-paren
`(show-paren-mismatch ((t (:foreground ,acme-yellow :background ,acme-red :weight normal))))
`(show-paren-match ((t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
;;;;; mode-line/sml-mode-line
`(mode-line ((,class (:foreground ,fg :background ,acme-blue-light :box t))))
`(mode-line-inactive ((t (:foreground ,fg :background ,bg-dark :box t))))
`(mode-line-buffer-id ((t (:foreground ,fg :weight bold)))) ; associated buffer/file name
`(sml/global ((t (:foreground ,fg))))
`(sml/modes ((t (:foreground ,acme-green :background ,acme-green-light))))
`(sml/filename ((t (:foreground ,acme-red))))
`(sml/folder ((t (:foreground ,fg))))
`(sml/prefix ((t (:foreground ,fg))))
`(sml/read-only ((t (:foreground ,fg))))
`(sml/modified ((t (:foreground ,acme-red :weight normal))))
`(sml/outside-modified ((t (:background ,acme-red :foreground ,acme-red-light :weight normal))))
`(sml/line-number ((t (:foreground ,fg :weight normal))))
`(sml/col-number ((t (:foreground ,fg :weight normal))))
`(sml/vc ((t (:foreground ,fg :weight normal))))
`(sml/vc-edited ((t (:foreground ,acme-red :weight normal))))
`(sml/git ((t (:foreground ,fg :weight normal))))
;;;;; sh
`(sh-heredoc-face ((t (:foreground ,acme-purple))))
;;;;; web-mode
`(web-mode-builtin-face ((t (:inherit ,font-lock-builtin-face))))
`(web-mode-comment-face ((t (:inherit ,font-lock-comment-face))))
`(web-mode-constant-face ((t (:inherit ,font-lock-constant-face))))
`(web-mode-doctype-face ((t (:inherit ,font-lock-comment-face))))
`(web-mode-folded-face ((t (:underline t))))
`(web-mode-function-name-face ((t (:foreground ,fg :weight normal))))
`(web-mode-html-attr-name-face ((t (:foreground ,fg))))
`(web-mode-html-attr-value-face ((t (:inherit ,font-lock-string-face))))
`(web-mode-html-tag-face ((t (:foreground ,acme-blue))))
`(web-mode-keyword-face ((t (:inherit ,font-lock-keyword-face))))
`(web-mode-preprocessor-face ((t (:inherit ,font-lock-preprocessor-face))))
`(web-mode-string-face ((t (:inherit ,font-lock-string-face))))
`(web-mode-type-face ((t (:inherit ,font-lock-type-face))))
`(web-mode-variable-name-face ((t (:inherit ,font-lock-variable-name-face))))
`(web-mode-server-background-face ((t (:background ,acme-green-light))))
`(web-mode-server-comment-face ((t (:inherit web-mode-comment-face))))
`(web-mode-server-string-face ((t (:foreground ,acme-red))))
`(web-mode-symbol-face ((t (:inherit font-lock-constant-face))))
`(web-mode-warning-face ((t (:inherit font-lock-warning-face))))
`(web-mode-whitespaces-face ((t (:background ,acme-red-light))))
`(web-mode-block-face ((t (:background ,acme-green-light))))
`(web-mode-current-element-highlight-face ((t (:foreground ,fg :background ,acme-blue-light))))
`(web-mode-json-key-face ((,class (:inherit font-lock-string-face))))
`(web-mode-json-context-face ((,class (:inherit font-lock-string-face :bold t))))
;;;;; which-func-mode
`(which-func ((t (:foreground ,acme-purple :background ,acme-purple-light))))
;;;;; yascroll
`(yascroll:thumb-text-area ((t (:background ,highlight))))
`(yascroll:thumb-fringe ((t (:background ,bg :foreground ,bg
:box (:line-width 1 :style released-button)))))
;;;;; Org
`(org-level-1 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t))))
`(org-level-2 ((t (:background ,acme-blue-light :foreground ,acme-cyan :weight bold :overline t))))
`(org-level-3 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t))))
`(org-level-4 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
`(org-level-5 ((t (:background ,acme-blue-light :foreground ,acme-blue))))
`(org-level-6 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
`(org-level-7 ((t (:background ,acme-blue-light :foreground ,acme-blue))))
`(org-level-8 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
`(org-document-title ((t (:height 1.2 :foreground ,acme-blue :weight bold :underline t)))) ; #TITLE
`(org-meta-line ((t (:foreground ,acme-green))))
`(org-document-info ((t (:foreground ,acme-cyan :weight normal))))
`(org-document-info-keyword ((t (:foreground ,acme-cyan))))
`(org-todo ((t (:foreground ,acme-yellow :background ,bg-alt :weight normal :box (:line-width 1 :style released-button)))))
`(org-done ((t (:foreground ,acme-green :background ,acme-green-light :weight normal :box (:style released-button)))))
`(org-date ((t (:foreground ,acme-purple))))
`(org-table ((t (:foreground ,acme-purple))))
`(org-formula ((t (:foreground ,acme-blue :background ,bg-alt))))
`(org-code ((t (:foreground ,acme-red :background ,bg-alt))))
`(org-verbatim ((t (:foreground ,fg :background ,bg-alt :underline t))))
`(org-special-keyword ((t (:foreground ,acme-cyan))))
`(org-agenda-date ((t (:foreground ,acme-cyan))))
`(org-agenda-structure ((t (:foreground ,acme-purple))))
`(org-block ((t (:foreground ,fg :background ,bg-alt :extend t))))
`(org-block-background ((t (:background ,bg-alt :extend t))))
`(org-block-begin-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t))))
`(org-block-end-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t))))
;;;;; origami
`(origami-fold-replacement-face ((t (:foreground ,acme-red :background ,acme-red-light
:box (:line-width -1)))))
;;;;; git-gutter
`(git-gutter:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal))))
`(git-gutter:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal))))
`(git-gutter:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal))))
`(git-gutter-fr:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal))))
`(git-gutter-fr:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal))))
`(git-gutter-fr:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal))))
;;;;; diff-hl
`(diff-hl-insert ((t (:background ,acme-green-alt :foreground ,acme-green-alt))))
`(diff-hl-delete ((t (:background ,acme-red :foreground ,acme-red))))
`(diff-hl-change ((t (:background ,acme-yellow :foreground ,acme-yellow))))
;;;;; mu4e, mail
`(mu4e-header-highlight-face ((t (:background ,highlight))))
`(mu4e-unread-face ((t (:foreground ,acme-blue :weight normal))))
`(mu4e-flagged-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
`(mu4e-compose-separator-face ((t (:foreground ,acme-green))))
`(mu4e-header-value-face ((t (:foreground ,fg))))
`(message-header-name ((t (:foreground ,acme-purple :weight normal))))
`(message-header-to ((t (:foreground ,acme-blue))))
`(message-header-subject ((t (:foreground ,acme-blue))))
`(message-header-other ((t (:foreground ,acme-blue))))
`(message-cited-text ((t (:inherit font-lock-comment-face))))
;;;;; term-mode (vterm too)
`(term ((,class (:foreground ,fg :background ,bg))))
`(term-color-black ((,class (:foreground ,fg :background ,fg))))
`(term-color-blue ((,class (:foreground ,acme-blue :background ,acme-blue))))
`(term-color-red ((,class (:foreground ,acme-red :background ,acme-red))))
`(term-color-green ((,class (:foreground ,acme-green :background ,acme-green))))
`(term-color-yellow ((,class (:foreground ,acme-yellow :background ,acme-yellow))))
`(term-color-magenta ((,class (:foreground ,acme-purple :background ,acme-purple))))
`(term-color-cyan ((,class (:foreground ,acme-cyan :background ,acme-cyan))))
`(term-color-white ((,class (:foreground ,fg :background ,fg))))
;;;;; fill-column-indicator
`(fci-rule-color ((t (:foreground ,highlight-alt))))
`(fill-column-indicator ((t (:foreground ,highlight-alt))))))
;;;###autoload
(when (and (boundp 'custom-theme-load-path) load-file-name)
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'acme)
(provide 'acme-theme)
;;; acme-theme.el ends here