mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 11:00:27 +10:00
Adding current GNU Emacs configs.
This commit is contained in:
584
.config/emacs/config.el
Normal file
584
.config/emacs/config.el
Normal file
@@ -0,0 +1,584 @@
|
||||
(defvar elpaca-installer-version 0.4)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(kill-buffer buffer)
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
(use-package evil-tutor)
|
||||
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
|
||||
;; set up 'SPC' as the global leader key
|
||||
(general-create-definer dt/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(dt/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(dt/leader-keys
|
||||
"b" '(:ignore t :wk "Buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(dt/leader-keys
|
||||
"d" '(:ignore t :wk "Dired")
|
||||
"d d" '(dired :wk "Open dired")
|
||||
"d j" '(dired-jump :wk "Dired jump to current")
|
||||
"d n" '(neotree-dir :wk "Open directory in neotree")
|
||||
"d p" '(peep-dired :wk "Peep-dired"))
|
||||
|
||||
(dt/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate and elisp expression")
|
||||
"e h" '(counsel-esh-history :which-key "Eshell history")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e s" '(eshell :which-key "Eshell"))
|
||||
|
||||
(dt/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h t" '(load-theme :wk "Load theme")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
;;"h r r" '((lambda () (interactive) (load-file "~/.config/emacs/init.el")) :wk "Reload emacs config"))
|
||||
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m" '(:ignore t :wk "Org")
|
||||
"m a" '(org-agenda :wk "Org agenda")
|
||||
"m e" '(org-export-dispatch :wk "Org export dispatch")
|
||||
"m i" '(org-toggle-item :wk "Org toggle item")
|
||||
"m t" '(org-todo :wk "Org todo")
|
||||
"m B" '(org-babel-tangle :wk "Org babel tangle")
|
||||
"m T" '(org-todo-list :wk "Org todo list"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m b" '(:ignore t :wk "Tables")
|
||||
"m b -" '(org-table-insert-hline :wk "Insert hline in table"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m d" '(:ignore t :wk "Date/deadline")
|
||||
"m d t" '(org-time-stamp :wk "Org time stamp"))
|
||||
|
||||
(dt/leader-keys
|
||||
"p" '(projectile-command-map :wk "Projectile"))
|
||||
|
||||
(dt/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t e" '(eshell-toggle :wk "Toggle eshell")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t n" '(neotree-toggle :wk "Toggle neotree file viewer")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"t v" '(vterm-toggle :wk "Toggle vterm"))
|
||||
|
||||
(dt/leader-keys
|
||||
"w" '(:ignore t :wk "Windows")
|
||||
;; Window splits
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w n" '(evil-window-new :wk "New window")
|
||||
"w s" '(evil-window-split :wk "Horizontal split window")
|
||||
"w v" '(evil-window-vsplit :wk "Vertical split window")
|
||||
;; Window motions
|
||||
"w h" '(evil-window-left :wk "Window left")
|
||||
"w j" '(evil-window-down :wk "Window down")
|
||||
"w k" '(evil-window-up :wk "Window up")
|
||||
"w l" '(evil-window-right :wk "Window right")
|
||||
"w w" '(evil-window-next :wk "Goto next window")
|
||||
;; Move Windows
|
||||
"w H" '(buf-move-left :wk "Buffer move left")
|
||||
"w J" '(buf-move-down :wk "Buffer move down")
|
||||
"w K" '(buf-move-up :wk "Buffer move up")
|
||||
"w L" '(buf-move-right :wk "Buffer move right"))
|
||||
)
|
||||
|
||||
(defun emacs-counsel-launcher ()
|
||||
"Create and select a frame called emacs-counsel-launcher which consists only of a minibuffer and has specific dimensions. Runs counsel-linux-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(counsel-linux-app)
|
||||
(delete-frame))))
|
||||
|
||||
(use-package app-launcher
|
||||
:elpaca '(app-launcher :host github :repo "SebastienWae/app-launcher"))
|
||||
;; create a global keyboard shortcut with the following code
|
||||
;; emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)"
|
||||
|
||||
(defun emacs-run-launcher ()
|
||||
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(app-launcher-run-app)
|
||||
(delete-frame))))
|
||||
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:if (display-graphic-p))
|
||||
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
|
||||
(require 'windmove)
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-up ()
|
||||
"Swap the current buffer and the buffer above the split.
|
||||
If there is no split, ie now window above the current one, an
|
||||
error is signaled."
|
||||
;; "Switches between the current buffer, and the buffer above the
|
||||
;; split, if possible."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'up))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No window above this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-down ()
|
||||
"Swap the current buffer and the buffer under the split.
|
||||
If there is no split, ie now window under the current one, an
|
||||
error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'down))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (or (null other-win)
|
||||
(string-match "^ \\*Minibuf" (buffer-name (window-buffer other-win))))
|
||||
(error "No window under this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-left ()
|
||||
"Swap the current buffer and the buffer on the left of the split.
|
||||
If there is no split, ie now window on the left of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'left))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No left split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-right ()
|
||||
"Swap the current buffer and the buffer on the right of the split.
|
||||
If there is no split, ie now window on the right of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'right))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No right split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner (concat user-emacs-directory "images/dtmacs-logo.png")) ;; use custom image as banner
|
||||
(setq dashboard-center-content nil) ;; set to 't' for centered content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5 )
|
||||
(bookmarks . 3)
|
||||
(projects . 3)
|
||||
(registers . 3)))
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book")))
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
(use-package diminish)
|
||||
|
||||
(use-package dired-open
|
||||
:config
|
||||
(setq dired-open-extensions '(("gif" . "sxiv")
|
||||
("jpg" . "sxiv")
|
||||
("png" . "sxiv")
|
||||
("mkv" . "mpv")
|
||||
("mp4" . "mpv"))))
|
||||
|
||||
(use-package peep-dired
|
||||
:after dired
|
||||
:hook (evil-normalize-keymaps . peep-dired-hook)
|
||||
:config
|
||||
(evil-define-key 'normal dired-mode-map (kbd "h") 'dired-up-directory)
|
||||
(evil-define-key 'normal dired-mode-map (kbd "l") 'dired-open-file) ; use dired-find-file instead if not using dired-open package
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file)
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file)
|
||||
)
|
||||
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
|
||||
(set-face-attribute 'default nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "Ubuntu"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "JetBrains Mono-11"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
(setq-default line-spacing 0.12)
|
||||
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
|
||||
(global-display-line-numbers-mode 1)
|
||||
(global-visual-line-mode t)
|
||||
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
(use-package haskell-mode)
|
||||
(use-package lua-mode)
|
||||
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1)
|
||||
:config
|
||||
(setq doom-modeline-height 30 ;; sets modeline height
|
||||
doom-modeline-bar-width 5 ;; sets right bar width
|
||||
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||
doom-modeline-persp-icon t)) ;; adds folder icon next to persp name
|
||||
|
||||
(use-package neotree
|
||||
:config
|
||||
(setq neo-smart-open t
|
||||
neo-show-hidden-files t
|
||||
neo-window-width 55
|
||||
neo-window-fixed-size nil
|
||||
inhibit-compacting-font-caches t
|
||||
projectile-switch-project-action 'neotree-projectile-action)
|
||||
;; truncate long file names in neotree
|
||||
(add-hook 'neo-after-create-hook
|
||||
#'(lambda (_)
|
||||
(with-current-buffer (get-buffer neo-buffer-name)
|
||||
(setq truncate-lines t)
|
||||
(setq word-wrap nil)
|
||||
(make-local-variable 'auto-hscroll-mode)
|
||||
(setq auto-hscroll-mode nil)))))
|
||||
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
|
||||
(electric-indent-mode -1)
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
|
||||
(eval-after-load 'org-indent '(diminish 'org-indent-mode))
|
||||
|
||||
(custom-set-faces
|
||||
'(org-level-1 ((t (:inherit outline-1 :background nil :height 1.7))))
|
||||
'(org-level-2 ((t (:inherit outline-2 :height 1.6))))
|
||||
'(org-level-3 ((t (:inherit outline-3 :height 1.5))))
|
||||
'(org-level-4 ((t (:inherit outline-4 :height 1.4))))
|
||||
'(org-level-5 ((t (:inherit outline-5 :height 1.3))))
|
||||
'(org-level-6 ((t (:inherit outline-5 :height 1.2))))
|
||||
'(org-level-7 ((t (:inherit outline-5 :height 1.1)))))
|
||||
|
||||
(require 'org-tempo)
|
||||
|
||||
(use-package projectile
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook org-mode prog-mode)
|
||||
|
||||
(defun reload-init-file ()
|
||||
(interactive)
|
||||
(load-file user-init-file)
|
||||
(load-file user-init-file))
|
||||
|
||||
(use-package eshell-toggle
|
||||
:custom
|
||||
(eshell-toggle-size-fraction 3)
|
||||
(eshell-toggle-use-projectile-root t)
|
||||
(eshell-toggle-run-command nil)
|
||||
(eshell-toggle-init-function #'eshell-toggle-init-ansi-term))
|
||||
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
;; eshell-syntax-highlighting -- adds fish/zsh-like syntax highlighting.
|
||||
;; eshell-rc-script -- your profile for eshell; like a bashrc for eshell.
|
||||
;; eshell-aliases-file -- sets an aliases file for the eshell.
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/bin/sh"
|
||||
vterm-max-scrollback 5000))
|
||||
|
||||
(use-package vterm-toggle
|
||||
:after vterm
|
||||
:config
|
||||
(setq vterm-toggle-fullscreen-p nil)
|
||||
(setq vterm-toggle-scope 'project)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((lambda (buffer-or-name _)
|
||||
(let ((buffer (get-buffer buffer-or-name)))
|
||||
(with-current-buffer buffer
|
||||
(or (equal major-mode 'vterm-mode)
|
||||
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||
;;(direction . bottom)
|
||||
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.4))))
|
||||
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(dt/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")
|
||||
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
;; Sets the default theme to load!!!
|
||||
(load-theme 'doom-one t)
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
;; Corrects (and improves) org-mode's native fontification.
|
||||
(doom-themes-org-config))
|
||||
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 100)) ; For all new frames henceforth
|
||||
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-idle-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " → " ))
|
||||
845
.config/emacs/config.org
Normal file
845
.config/emacs/config.org
Normal file
@@ -0,0 +1,845 @@
|
||||
#+TITLE: DT's GNU Emacs Config
|
||||
#+AUTHOR: Derek Taylor (DT)
|
||||
#+DESCRIPTION: DT's personal Emacs config.
|
||||
#+STARTUP: showeverything
|
||||
#+OPTIONS: toc:2
|
||||
|
||||
* TABLE OF CONTENTS :toc:
|
||||
- [[#important-programs-to-load-first][IMPORTANT PROGRAMS TO LOAD FIRST]]
|
||||
- [[#elpaca-package-manager][Elpaca Package Manager]]
|
||||
- [[#load-evil-mode][Load Evil Mode]]
|
||||
- [[#general-keybindings][General Keybindings]]
|
||||
- [[#app-launchers][APP LAUNCHERS]]
|
||||
- [[#counsel-linux-app][Counsel-Linux-App]]
|
||||
- [[#app-launcher][App-Launcher]]
|
||||
- [[#all-the-icons][ALL THE ICONS]]
|
||||
- [[#buffer-move][BUFFER-MOVE]]
|
||||
- [[#company][COMPANY]]
|
||||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#diminish][DIMINISH]]
|
||||
- [[#dired][DIRED]]
|
||||
- [[#flycheck][FLYCHECK]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#setting-the-font-face][Setting the Font Face]]
|
||||
- [[#zooming-inout][Zooming In/Out]]
|
||||
- [[#graphical-user-interface-tweaks][GRAPHICAL USER INTERFACE TWEAKS]]
|
||||
- [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]]
|
||||
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
|
||||
- [[#ivy-counsel][IVY (COUNSEL)]]
|
||||
- [[#language-support][LANGUAGE SUPPORT]]
|
||||
- [[#modeline][MODELINE]]
|
||||
- [[#neotree][NEOTREE]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
- [[#enabling-table-of-contents][Enabling Table of Contents]]
|
||||
- [[#enabling-org-bullets][Enabling Org Bullets]]
|
||||
- [[#disable-electric-indent][Disable Electric Indent]]
|
||||
- [[#diminish-org-indent-mode][Diminish Org Indent Mode]]
|
||||
- [[#org-level-headers][Org Level Headers]]
|
||||
- [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]]
|
||||
- [[#projectile][PROJECTILE]]
|
||||
- [[#rainbow-mode][RAINBOW MODE]]
|
||||
- [[#reload-emacs][RELOAD EMACS]]
|
||||
- [[#shells-and-terminals][SHELLS AND TERMINALS]]
|
||||
- [[#eshell][Eshell]]
|
||||
- [[#vterm][Vterm]]
|
||||
- [[#vterm-toggle][Vterm-Toggle]]
|
||||
- [[#sudo-edit][SUDO EDIT]]
|
||||
- [[#theme][THEME]]
|
||||
- [[#transparency][TRANSPARENCY]]
|
||||
- [[#which-key][WHICH-KEY]]
|
||||
|
||||
* IMPORTANT PROGRAMS TO LOAD FIRST
|
||||
** Elpaca Package Manager
|
||||
#+begin_src emacs-lisp
|
||||
(defvar elpaca-installer-version 0.4)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(kill-buffer buffer)
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
#+end_src
|
||||
|
||||
** Load Evil Mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
(use-package evil-tutor)
|
||||
#+end_src
|
||||
|
||||
** General Keybindings
|
||||
#+begin_src emacs-lisp
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
|
||||
;; set up 'SPC' as the global leader key
|
||||
(general-create-definer dt/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(dt/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(dt/leader-keys
|
||||
"b" '(:ignore t :wk "Buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(dt/leader-keys
|
||||
"d" '(:ignore t :wk "Dired")
|
||||
"d d" '(dired :wk "Open dired")
|
||||
"d j" '(dired-jump :wk "Dired jump to current")
|
||||
"d n" '(neotree-dir :wk "Open directory in neotree")
|
||||
"d p" '(peep-dired :wk "Peep-dired"))
|
||||
|
||||
(dt/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate and elisp expression")
|
||||
"e h" '(counsel-esh-history :which-key "Eshell history")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e s" '(eshell :which-key "Eshell"))
|
||||
|
||||
(dt/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h t" '(load-theme :wk "Load theme")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
;;"h r r" '((lambda () (interactive) (load-file "~/.config/emacs/init.el")) :wk "Reload emacs config"))
|
||||
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m" '(:ignore t :wk "Org")
|
||||
"m a" '(org-agenda :wk "Org agenda")
|
||||
"m e" '(org-export-dispatch :wk "Org export dispatch")
|
||||
"m i" '(org-toggle-item :wk "Org toggle item")
|
||||
"m t" '(org-todo :wk "Org todo")
|
||||
"m B" '(org-babel-tangle :wk "Org babel tangle")
|
||||
"m T" '(org-todo-list :wk "Org todo list"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m b" '(:ignore t :wk "Tables")
|
||||
"m b -" '(org-table-insert-hline :wk "Insert hline in table"))
|
||||
|
||||
(dt/leader-keys
|
||||
"m d" '(:ignore t :wk "Date/deadline")
|
||||
"m d t" '(org-time-stamp :wk "Org time stamp"))
|
||||
|
||||
(dt/leader-keys
|
||||
"p" '(projectile-command-map :wk "Projectile"))
|
||||
|
||||
(dt/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t e" '(eshell-toggle :wk "Toggle eshell")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t n" '(neotree-toggle :wk "Toggle neotree file viewer")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines")
|
||||
"t v" '(vterm-toggle :wk "Toggle vterm"))
|
||||
|
||||
(dt/leader-keys
|
||||
"w" '(:ignore t :wk "Windows")
|
||||
;; Window splits
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w n" '(evil-window-new :wk "New window")
|
||||
"w s" '(evil-window-split :wk "Horizontal split window")
|
||||
"w v" '(evil-window-vsplit :wk "Vertical split window")
|
||||
;; Window motions
|
||||
"w h" '(evil-window-left :wk "Window left")
|
||||
"w j" '(evil-window-down :wk "Window down")
|
||||
"w k" '(evil-window-up :wk "Window up")
|
||||
"w l" '(evil-window-right :wk "Window right")
|
||||
"w w" '(evil-window-next :wk "Goto next window")
|
||||
;; Move Windows
|
||||
"w H" '(buf-move-left :wk "Buffer move left")
|
||||
"w J" '(buf-move-down :wk "Buffer move down")
|
||||
"w K" '(buf-move-up :wk "Buffer move up")
|
||||
"w L" '(buf-move-right :wk "Buffer move right"))
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
* APP LAUNCHERS
|
||||
|
||||
** Counsel-Linux-App
|
||||
Since we have counsel installed, we can use =counsel-linux-app= to launch our Linux apps. It list the apps by their executable command, so it's kind of tricky to use.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun emacs-counsel-launcher ()
|
||||
"Create and select a frame called emacs-counsel-launcher which consists only of a minibuffer and has specific dimensions. Runs counsel-linux-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(counsel-linux-app)
|
||||
(delete-frame))))
|
||||
|
||||
#+end_src
|
||||
|
||||
** App-Launcher
|
||||
The =app-launcher= is a better run launcher since it reads the desktop applications on your system and you can search them by their names as defined in their desktop file. This means that sometimes you have to search for a generic term rather than the actual binary command of the program.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package app-launcher
|
||||
:elpaca '(app-launcher :host github :repo "SebastienWae/app-launcher"))
|
||||
;; create a global keyboard shortcut with the following code
|
||||
;; emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)"
|
||||
|
||||
(defun emacs-run-launcher ()
|
||||
"Create and select a frame called emacs-run-launcher which consists only of a minibuffer and has specific dimensions. Runs app-launcher-run-app on that frame, which is an emacs command that prompts you to select an app and open it in a dmenu like behaviour. Delete the frame after that command has exited"
|
||||
(interactive)
|
||||
(with-selected-frame
|
||||
(make-frame '((name . "emacs-run-launcher")
|
||||
(minibuffer . only)
|
||||
(fullscreen . 0) ; no fullscreen
|
||||
(undecorated . t) ; remove title bar
|
||||
;;(auto-raise . t) ; focus on this frame
|
||||
;;(tool-bar-lines . 0)
|
||||
;;(menu-bar-lines . 0)
|
||||
(internal-border-width . 10)
|
||||
(width . 80)
|
||||
(height . 11)))
|
||||
(unwind-protect
|
||||
(app-launcher-run-app)
|
||||
(delete-frame))))
|
||||
|
||||
#+end_src
|
||||
|
||||
* ALL THE ICONS
|
||||
This is an icon set that can be used with dashboard, dired, ibuffer and other Emacs programs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:if (display-graphic-p))
|
||||
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
#+end_src
|
||||
|
||||
* BUFFER-MOVE
|
||||
Creating some functions to allow us to easily move windows (splits) around. The following block of code was taken from buffer-move.el found on the EmacsWiki:
|
||||
https://www.emacswiki.org/emacs/buffer-move.el
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'windmove)
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-up ()
|
||||
"Swap the current buffer and the buffer above the split.
|
||||
If there is no split, ie now window above the current one, an
|
||||
error is signaled."
|
||||
;; "Switches between the current buffer, and the buffer above the
|
||||
;; split, if possible."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'up))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No window above this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-down ()
|
||||
"Swap the current buffer and the buffer under the split.
|
||||
If there is no split, ie now window under the current one, an
|
||||
error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'down))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (or (null other-win)
|
||||
(string-match "^ \\*Minibuf" (buffer-name (window-buffer other-win))))
|
||||
(error "No window under this one")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-left ()
|
||||
"Swap the current buffer and the buffer on the left of the split.
|
||||
If there is no split, ie now window on the left of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'left))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No left split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
|
||||
;;;###autoload
|
||||
(defun buf-move-right ()
|
||||
"Swap the current buffer and the buffer on the right of the split.
|
||||
If there is no split, ie now window on the right of the current
|
||||
one, an error is signaled."
|
||||
(interactive)
|
||||
(let* ((other-win (windmove-find-other-window 'right))
|
||||
(buf-this-buf (window-buffer (selected-window))))
|
||||
(if (null other-win)
|
||||
(error "No right split")
|
||||
;; swap top with this one
|
||||
(set-window-buffer (selected-window) (window-buffer other-win))
|
||||
;; move this one to top
|
||||
(set-window-buffer other-win buf-this-buf)
|
||||
(select-window other-win))))
|
||||
#+end_src
|
||||
|
||||
* COMPANY
|
||||
[[https://company-mode.github.io/][Company]] is a text completion framework for Emacs. The name stands for "complete anything". Completion will start automatically after you type a few letters. Use M-n and M-p to select, <return> to complete or <tab> to complete the common part.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
#+end_src
|
||||
|
||||
* DASHBOARD
|
||||
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Emacs Is More Than A Text Editor!")
|
||||
;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
||||
(setq dashboard-startup-banner (concat user-emacs-directory "images/dtmacs-logo.png")) ;; use custom image as banner
|
||||
(setq dashboard-center-content nil) ;; set to 't' for centered content
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5 )
|
||||
(bookmarks . 3)
|
||||
(projects . 3)
|
||||
(registers . 3)))
|
||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||
(bookmarks . "book")))
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
#+end_src
|
||||
|
||||
* DIMINISH
|
||||
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package diminish)
|
||||
|
||||
#+end_src
|
||||
|
||||
* DIRED
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dired-open
|
||||
:config
|
||||
(setq dired-open-extensions '(("gif" . "sxiv")
|
||||
("jpg" . "sxiv")
|
||||
("png" . "sxiv")
|
||||
("mkv" . "mpv")
|
||||
("mp4" . "mpv"))))
|
||||
|
||||
(use-package peep-dired
|
||||
:after dired
|
||||
:hook (evil-normalize-keymaps . peep-dired-hook)
|
||||
:config
|
||||
(evil-define-key 'normal dired-mode-map (kbd "h") 'dired-up-directory)
|
||||
(evil-define-key 'normal dired-mode-map (kbd "l") 'dired-open-file) ; use dired-find-file instead if not using dired-open package
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file)
|
||||
(evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file)
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
* FLYCHECK
|
||||
Install =luacheck= from your Linux distro's repositories for flycheck to work correctly with lua files. Install =python-pylint= for flycheck to work with python files. Haskell works with flycheck as long as =haskell-ghc= or =haskell-stack-ghc= is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
|
||||
#+end_src
|
||||
|
||||
* FONTS
|
||||
Defining the various fonts that Emacs will use.
|
||||
|
||||
** Setting the Font Face
|
||||
#+begin_src emacs-lisp
|
||||
(set-face-attribute 'default nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "Ubuntu"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "JetBrains Mono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "JetBrains Mono-11"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
(setq-default line-spacing 0.12)
|
||||
|
||||
#+end_src
|
||||
|
||||
** Zooming In/Out
|
||||
You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTRL plus the mouse wheel for zooming in/out.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
#+end_src
|
||||
|
||||
|
||||
* GRAPHICAL USER INTERFACE TWEAKS
|
||||
Let's make GNU Emacs look a little better.
|
||||
|
||||
** Disable Menubar, Toolbars and Scrollbars
|
||||
#+begin_src emacs-lisp
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
#+end_src
|
||||
|
||||
** Display Line Numbers and Truncated Lines
|
||||
#+begin_src emacs-lisp
|
||||
(global-display-line-numbers-mode 1)
|
||||
(global-visual-line-mode t)
|
||||
#+end_src
|
||||
|
||||
* IVY (COUNSEL)
|
||||
+ Ivy, a generic completion mechanism for Emacs.
|
||||
+ Counsel, a collection of Ivy-enhanced versions of common Emacs commands.
|
||||
+ Ivy-rich allows us to add descriptions alongside the commands in M-x.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
#+end_src
|
||||
|
||||
* LANGUAGE SUPPORT
|
||||
Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM, AWK, C, C++, Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, M4, Makefiles, Metafont, Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, Verilog, and VHDL. Other languages will require you to install additional modes.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package haskell-mode)
|
||||
(use-package lua-mode)
|
||||
|
||||
#+end_src
|
||||
|
||||
* MODELINE
|
||||
The modeline is the bottom status bar that appears in Emacs windows. For more information on what is available to configure in the Doom modeline, check out:
|
||||
https://github.com/seagle0128/doom-modeline
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1)
|
||||
:config
|
||||
(setq doom-modeline-height 30 ;; sets modeline height
|
||||
doom-modeline-bar-width 5 ;; sets right bar width
|
||||
doom-modeline-persp-name t ;; adds perspective name to modeline
|
||||
doom-modeline-persp-icon t)) ;; adds folder icon next to persp name
|
||||
|
||||
#+end_src
|
||||
|
||||
* NEOTREE
|
||||
Neotree is a file tree viewer. When you open neotree, it jumps to the current file thanks to neo-smart-open. The neo-window-fixed-size setting makes the neotree width be adjustable. NeoTree provides following themes: classic, ascii, arrow, icons, and nerd. Theme can be configed by setting "two" themes for neo-theme: one for the GUI and one for the terminal. I like to use 'SPC t' for 'toggle' keybindings, so I have used 'SPC t n' for toggle-neotree.
|
||||
|
||||
| COMMAND | DESCRIPTION | KEYBINDING |
|
||||
|----------------+---------------------------+------------|
|
||||
| neotree-toggle | /Toggle neotree/ | SPC t n |
|
||||
| neotree- dir | /Open directory in neotree/ | SPC d n |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package neotree
|
||||
:config
|
||||
(setq neo-smart-open t
|
||||
neo-show-hidden-files t
|
||||
neo-window-width 55
|
||||
neo-window-fixed-size nil
|
||||
inhibit-compacting-font-caches t
|
||||
projectile-switch-project-action 'neotree-projectile-action)
|
||||
;; truncate long file names in neotree
|
||||
(add-hook 'neo-after-create-hook
|
||||
#'(lambda (_)
|
||||
(with-current-buffer (get-buffer neo-buffer-name)
|
||||
(setq truncate-lines t)
|
||||
(setq word-wrap nil)
|
||||
(make-local-variable 'auto-hscroll-mode)
|
||||
(setq auto-hscroll-mode nil)))))
|
||||
|
||||
#+end_src
|
||||
|
||||
* ORG MODE
|
||||
** Enabling Table of Contents
|
||||
#+begin_src emacs-lisp
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
#+end_src
|
||||
|
||||
** Enabling Org Bullets
|
||||
Org-bullets gives us attractive bullets rather than asterisks.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
#+end_src
|
||||
|
||||
** Disable Electric Indent
|
||||
Org mode source blocks have some really weird and annoying default indentation behavior. I think this has to do with electric-indent-mode, which is turned on by default in Emacs, and the fact that Org defaults to indenting 2 spaces in source blocks. So let's turn it all of that OFF!
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(electric-indent-mode -1)
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
#+end_src
|
||||
|
||||
** Diminish Org Indent Mode
|
||||
Removes "Ind" from showing in the modeline.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(eval-after-load 'org-indent '(diminish 'org-indent-mode))
|
||||
|
||||
#+end_src
|
||||
|
||||
** Org Level Headers
|
||||
#+begin_src emacs-lisp
|
||||
(custom-set-faces
|
||||
'(org-level-1 ((t (:inherit outline-1 :height 1.7))))
|
||||
'(org-level-2 ((t (:inherit outline-2 :height 1.6))))
|
||||
'(org-level-3 ((t (:inherit outline-3 :height 1.5))))
|
||||
'(org-level-4 ((t (:inherit outline-4 :height 1.4))))
|
||||
'(org-level-5 ((t (:inherit outline-5 :height 1.3))))
|
||||
'(org-level-6 ((t (:inherit outline-5 :height 1.2))))
|
||||
'(org-level-7 ((t (:inherit outline-5 :height 1.1)))))
|
||||
#+end_src
|
||||
|
||||
** Source Code Block Tag Expansion
|
||||
Org-tempo is not a separate package but a module within org that can be enabled. Org-tempo allows for '<s' followed by TAB to expand to a begin_src tag. Other expansions available include:
|
||||
|
||||
| Typing the below + TAB | Expands to ... |
|
||||
|------------------------+-----------------------------------------|
|
||||
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||
| <c | '#+BEGIN_CENTER' … '#+END_CENTER' |
|
||||
| <C | '#+BEGIN_COMMENT' … '#+END_COMMENT' |
|
||||
| <e | '#+BEGIN_EXAMPLE' … '#+END_EXAMPLE' |
|
||||
| <E | '#+BEGIN_EXPORT' … '#+END_EXPORT' |
|
||||
| <h | '#+BEGIN_EXPORT html' … '#+END_EXPORT' |
|
||||
| <l | '#+BEGIN_EXPORT latex' … '#+END_EXPORT' |
|
||||
| <q | '#+BEGIN_QUOTE' … '#+END_QUOTE' |
|
||||
| <s | '#+BEGIN_SRC' … '#+END_SRC' |
|
||||
| <v | '#+BEGIN_VERSE' … '#+END_VERSE' |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'org-tempo)
|
||||
#+end_src
|
||||
|
||||
* PROJECTILE
|
||||
[[https://github.com/bbatsov/projectile][Projectile]] is a project interaction library for Emacs. It should be noted that many projectile commands do not work if you have set "fish" as the "shell-file-name" for Emacs. I had initially set "fish" as the "shell-file-name" in the Vterm section of this config, but oddly enough I changed it to "bin/sh" and projectile now works as expected, and Vterm still uses "fish" because my default user "sh" on my Linux system is "fish".
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package projectile
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
#+end_src
|
||||
|
||||
* RAINBOW MODE
|
||||
Display the actual color as a background for any hex color value (ex. #ffffff). The code block below enables rainbow-mode in all programming modes (prog-mode) as well as org-mode, which is why rainbow works in this document.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook org-mode prog-mode)
|
||||
#+end_src
|
||||
|
||||
* RELOAD EMACS
|
||||
This is just an example of how to create a simple function in Emacs. Use this function to reload Emacs after adding changes to the config. Yes, I am loading the user-init-file twice in this function, which is a hack because for some reason, just loading the user-init-file once does not work properly.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun reload-init-file ()
|
||||
(interactive)
|
||||
(load-file user-init-file)
|
||||
(load-file user-init-file))
|
||||
#+end_src
|
||||
|
||||
* SHELLS AND TERMINALS
|
||||
In my configs, all of my shells (bash, fish, zsh and the ESHELL) require my shell-color-scripts-git package to be installed. On Arch Linux, you can install it from the AUR. Otherwise, go to my shell-color-scripts repository on GitLab to get it.
|
||||
|
||||
** Eshell
|
||||
Eshell is an Emacs 'shell' that is written in Elisp.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package eshell-toggle
|
||||
:custom
|
||||
(eshell-toggle-size-fraction 3)
|
||||
(eshell-toggle-use-projectile-root t)
|
||||
(eshell-toggle-run-command nil)
|
||||
(eshell-toggle-init-function #'eshell-toggle-init-ansi-term))
|
||||
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
;; eshell-syntax-highlighting -- adds fish/zsh-like syntax highlighting.
|
||||
;; eshell-rc-script -- your profile for eshell; like a bashrc for eshell.
|
||||
;; eshell-aliases-file -- sets an aliases file for the eshell.
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
#+end_src
|
||||
|
||||
** Vterm
|
||||
Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets the shell to be used in M-x shell, M-x term, M-x ansi-term and M-x vterm. By default, the shell is set to 'fish' but could change it to 'bash' or 'zsh' if you prefer.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/bin/sh"
|
||||
vterm-max-scrollback 5000))
|
||||
#+end_src
|
||||
|
||||
** Vterm-Toggle
|
||||
[[https://github.com/jixiuf/vterm-toggle][vterm-toggle]] toggles between the vterm buffer and whatever buffer you are editing.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vterm-toggle
|
||||
:after vterm
|
||||
:config
|
||||
(setq vterm-toggle-fullscreen-p nil)
|
||||
(setq vterm-toggle-scope 'project)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((lambda (buffer-or-name _)
|
||||
(let ((buffer (get-buffer buffer-or-name)))
|
||||
(with-current-buffer buffer
|
||||
(or (equal major-mode 'vterm-mode)
|
||||
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||
;;(direction . bottom)
|
||||
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.4))))
|
||||
#+end_src
|
||||
|
||||
* SUDO EDIT
|
||||
[[https://github.com/nflath/sudo-edit][sudo-edit]] gives us the ability to open files with sudo privileges or switch over to editing with sudo privileges if we initially opened the file without such privileges.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(dt/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
#+end_src
|
||||
|
||||
* THEME
|
||||
The first line below designates the directory where will place all of our custom-made themes, which I have created only one (dtmacs) You can create your own Emacs themes with the help of the [[https://emacsfodder.github.io/emacs-theme-editor/][Emacs Theme Editor]]. I also am installing =doom-themes= because it contains a huge collection of themes. M-x load-theme will list all of the themes available.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'custom-theme-load-path "~/.config/emacs/themes/")
|
||||
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
;; Sets the default theme to load!!!
|
||||
(load-theme 'doom-one t)
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
;; Corrects (and improves) org-mode's native fontification.
|
||||
(doom-themes-org-config))
|
||||
#+end_src
|
||||
|
||||
* TRANSPARENCY
|
||||
With Emacs version 29, true transparency has been added. I have turned transparency off by setting the alpha to '100'. If you want some slight transparency, try setting alpha to '90'. Of course, if you set alpha to '0', the background of Emacs would completely transparent.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 100)) ; For all new frames henceforth
|
||||
|
||||
#+end_src
|
||||
|
||||
* WHICH-KEY
|
||||
#+begin_src emacs-lisp
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-idle-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " → " ))
|
||||
#+end_src
|
||||
|
||||
1
.config/emacs/early-init.el
Normal file
1
.config/emacs/early-init.el
Normal file
@@ -0,0 +1 @@
|
||||
(setq package-enable-at-startup nil)
|
||||
23
.config/emacs/eshell/aliases
Normal file
23
.config/emacs/eshell/aliases
Normal file
@@ -0,0 +1,23 @@
|
||||
# Aliases for emacs commands
|
||||
alias ff find-file $1
|
||||
|
||||
# Aliasing standard shell commands to better emacs alternatives
|
||||
alias less view-file $1
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias ls exa -al --color=always --group-directories-first $* # my preferred listing
|
||||
alias la exa -a --color=always --group-directories-first $* # all files and dirs
|
||||
alias ll exa -l --color=always --group-directories-first $* # long format
|
||||
alias lt exa -aT --color=always --group-directories-first $* # tree listing
|
||||
alias l. exa -a1 $* | grep "^\." # list hidden files
|
||||
|
||||
# Merge Xresources
|
||||
alias merge xrdb -merge ~/.Xresources
|
||||
|
||||
# Confirm before overwriting something
|
||||
alias cp cp -i $1
|
||||
alias mv mv -i $1
|
||||
alias rm rm -i $1
|
||||
|
||||
# Bare git repo alias for dotfiles
|
||||
alias config /usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME $*
|
||||
1
.config/emacs/eshell/profile
Normal file
1
.config/emacs/eshell/profile
Normal file
@@ -0,0 +1 @@
|
||||
colorscript random
|
||||
1
.config/emacs/eshell/profile~
Normal file
1
.config/emacs/eshell/profile~
Normal file
@@ -0,0 +1 @@
|
||||
colorscript random
|
||||
BIN
.config/emacs/images/dtmacs-logo.png
Normal file
BIN
.config/emacs/images/dtmacs-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
.config/emacs/images/emacs-dash.png
Normal file
BIN
.config/emacs/images/emacs-dash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
23
.config/emacs/init.el
Normal file
23
.config/emacs/init.el
Normal file
@@ -0,0 +1,23 @@
|
||||
(org-babel-load-file
|
||||
(expand-file-name
|
||||
"config.org"
|
||||
user-emacs-directory))
|
||||
(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.
|
||||
'(custom-safe-themes
|
||||
'("6945dadc749ac5cbd47012cad836f92aea9ebec9f504d32fe89a956260773ca4" "944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "636b135e4b7c86ac41375da39ade929e2bd6439de8901f53f88fde7dd5ac3561" "1f669e8abe4dc2855268c9a607b5e350e2811b3c5afd09af5939ff0c01a89c5a" default)))
|
||||
(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.
|
||||
'(org-level-1 ((t (:inherit outline-1 :height 1.7))))
|
||||
'(org-level-2 ((t (:inherit outline-2 :height 1.6))))
|
||||
'(org-level-3 ((t (:inherit outline-3 :height 1.5))))
|
||||
'(org-level-4 ((t (:inherit outline-4 :height 1.4))))
|
||||
'(org-level-5 ((t (:inherit outline-5 :height 1.3))))
|
||||
'(org-level-6 ((t (:inherit outline-5 :height 1.2))))
|
||||
'(org-level-7 ((t (:inherit outline-5 :height 1.1)))))
|
||||
317
.config/emacs/themes/dtmacs-theme.el
Normal file
317
.config/emacs/themes/dtmacs-theme.el
Normal file
@@ -0,0 +1,317 @@
|
||||
;;; dtmacs-theme.el --- Theme
|
||||
|
||||
;; Copyright (C) 2023 ,
|
||||
|
||||
;; Author: Derek Taylor (DT)
|
||||
;; Version: 0.1
|
||||
;; Package-Requires: ((emacs "24.1"))
|
||||
;; Created with ThemeCreator, https://github.com/mswift42/themecreator.
|
||||
|
||||
;; 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/>.
|
||||
|
||||
;; This file is not part of Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
;;; dtmacs-theme was created by Derek Taylor in 2023
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme dtmacs)
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
(fg1 "#d3eaf4")
|
||||
(fg2 "#cadae2")
|
||||
(fg3 "#748895")
|
||||
(fg4 "#4f545a")
|
||||
(fg6 "#c4c4c4")
|
||||
(bg1 "#192428")
|
||||
(bg2 "#24343e")
|
||||
(bg3 "#0c191d")
|
||||
(bg4 "#0d6f9f")
|
||||
(builtin "#41b2ea")
|
||||
(keyword "#9bee8b")
|
||||
(const "#96defa")
|
||||
(comment "#7a95a0")
|
||||
(func "#a094fb")
|
||||
(str "#89e14b")
|
||||
(type "#68cee8")
|
||||
(var "#ff6ba9")
|
||||
(bufid "#ffffff")
|
||||
(selection "#e81050")
|
||||
(warning "#e81050")
|
||||
(warning2 "#e86310")
|
||||
(todo "#c897ff")
|
||||
(done "#d6ff97")
|
||||
(unspec (when (>= emacs-major-version 29) 'unspecified)))
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(default ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(dashboard-footer ((,class (:foreground ,var :italic t))))
|
||||
`(dashboard-heading ((,class (:foreground ,const :weight bold))))
|
||||
`(dashboard-text-banner ((,class (:foreground ,fg1 :weight bold))))
|
||||
`(dashboard-banner-logo-title ((,class (:foreground ,str :weight bold))))
|
||||
`(font-lock-builtin-face ((,class (:foreground ,builtin))))
|
||||
`(font-lock-comment-face ((,class (:italic t :foreground ,comment))))
|
||||
`(font-lock-negation-char-face ((,class (:foreground ,const))))
|
||||
`(font-lock-reference-face ((,class (:foreground ,const))))
|
||||
`(font-lock-constant-face ((,class (:foreground ,const))))
|
||||
`(font-lock-doc-face ((,class (:foreground ,comment))))
|
||||
`(font-lock-function-name-face ((,class (:foreground ,func ))))
|
||||
`(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword))))
|
||||
`(font-lock-string-face ((,class (:foreground ,str))))
|
||||
`(font-lock-type-face ((,class (:foreground ,type ))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground ,var))))
|
||||
`(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2))))
|
||||
`(term-color-black ((,class (:foreground ,fg2 :background ,unspec))))
|
||||
;; `(region ((,class (:background ,fg1 :foreground ,bg1))))
|
||||
`(region ((,class (:background ,selection))))
|
||||
`(highlight ((,class (:foreground ,fg3 :background ,bg3))))
|
||||
`(hl-line ((,class (:background ,bg2))))
|
||||
`(fringe ((,class (:background ,bg1 :foreground ,fg4))))
|
||||
`(cursor ((,class (:background ,fg4))))
|
||||
`(isearch ((,class (:bold t :foreground ,warning :background ,bg3))))
|
||||
`(mode-line ((,class (:box (:line-width 4 :color ,bg2) :bold t :foreground ,fg3 :background ,bg2))))
|
||||
`(mode-line-inactive ((,class (:box (:line-width 4 :color ,bg3) :foreground ,fg3 :background ,bg3 :weight bold))))
|
||||
`(mode-line-buffer-id ((,class (:box nil :bold t :foreground ,bufid :background ,unspec))))
|
||||
`(mode-line-highlight ((,class (:box nil :foreground ,selection :weight bold))))
|
||||
`(mode-line-emphasis ((,class (:foreground ,fg1))))
|
||||
`(vertical-border ((,class (:foreground ,fg3))))
|
||||
`(minibuffer-prompt ((,class (:bold t :foreground ,builtin))))
|
||||
`(default-italic ((,class (:italic t))))
|
||||
`(link ((,class (:foreground ,const :underline t))))
|
||||
`(org-code ((,class (:foreground ,fg2))))
|
||||
`(org-hide ((,class (:foreground ,fg4))))
|
||||
`(org-level-1 ((,class (:bold t :foreground ,builtin :height 1.7))))
|
||||
`(org-level-2 ((,class (:bold t :foreground ,str :height 1.6))))
|
||||
`(org-level-3 ((,class (:bold t :foreground ,var :height 1.5))))
|
||||
`(org-level-4 ((,class (:bold t :foreground ,func :height 1.4))))
|
||||
`(org-level-5 ((,class (:bold t :foreground ,const :height 1.3))))
|
||||
`(org-level-6 ((,class (:bold t :foreground ,keyword :height 1.2))))
|
||||
`(org-level-7 ((,class (:bold t :foreground ,builtin :height 1.1))))
|
||||
`(org-level-8 ((,class (:bold t :foreground ,str :height 1.0))))
|
||||
`(org-date ((,class (:underline t :foreground ,var) )))
|
||||
`(org-footnote ((,class (:underline t :foreground ,fg4))))
|
||||
`(org-link ((,class (:underline t :foreground ,type ))))
|
||||
`(org-special-keyword ((,class (:foreground ,func))))
|
||||
`(org-block ((,class (:foreground ,fg2))))
|
||||
`(org-quote ((,class (:inherit org-block :slant italic))))
|
||||
`(org-verse ((,class (:inherit org-block :slant italic))))
|
||||
`(org-todo ((,class (:foreground ,todo :bold t :italic t))))
|
||||
`(org-done ((,class (:foreground ,done :bold t :italic t))))
|
||||
`(org-warning ((,class (:underline t :foreground ,warning))))
|
||||
`(org-agenda-structure ((,class (:weight bold :foreground ,fg3 :box (:color ,fg4) :background ,bg3))))
|
||||
`(org-agenda-date ((,class (:foreground ,var :height 1.1 ))))
|
||||
`(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4))))
|
||||
`(org-agenda-date-today ((,class (:weight bold :foreground ,keyword :height 1.4))))
|
||||
`(org-agenda-done ((,class (:foreground ,bg4))))
|
||||
`(org-scheduled ((,class (:foreground ,type))))
|
||||
`(org-scheduled-today ((,class (:foreground ,func :weight bold :height 1.2))))
|
||||
`(org-ellipsis ((,class (:foreground ,builtin))))
|
||||
`(org-verbatim ((,class (:foreground ,str))))
|
||||
`(org-document-info-keyword ((,class (:foreground ,func))))
|
||||
`(font-latex-bold-face ((,class (:foreground ,type))))
|
||||
`(font-latex-italic-face ((,class (:foreground ,var :italic t))))
|
||||
`(font-latex-string-face ((,class (:foreground ,str))))
|
||||
`(font-latex-match-reference-keywords ((,class (:foreground ,const))))
|
||||
`(font-latex-match-variable-keywords ((,class (:foreground ,var))))
|
||||
`(ido-only-match ((,class (:foreground ,warning))))
|
||||
`(org-sexp-date ((,class (:foreground ,fg4))))
|
||||
`(ido-first-match ((,class (:foreground ,keyword :bold t))))
|
||||
`(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t))))
|
||||
`(gnus-header-content ((,class (:foreground ,keyword))))
|
||||
`(gnus-header-from ((,class (:foreground ,var))))
|
||||
`(gnus-header-name ((,class (:foreground ,type))))
|
||||
`(gnus-header-subject ((,class (:foreground ,func :bold t))))
|
||||
`(mu4e-view-url-number-face ((,class (:foreground ,type))))
|
||||
`(mu4e-cited-1-face ((,class (:foreground ,fg2))))
|
||||
`(mu4e-cited-7-face ((,class (:foreground ,fg3))))
|
||||
`(mu4e-header-marks-face ((,class (:foreground ,type))))
|
||||
`(ffap ((,class (:foreground ,fg4))))
|
||||
`(js2-private-function-call ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
|
||||
`(js2-jsdoc-html-tag-name ((,class (:foreground ,var))))
|
||||
`(js2-external-variable ((,class (:foreground ,type ))))
|
||||
`(js2-function-param ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-value ((,class (:foreground ,str))))
|
||||
`(js2-private-member ((,class (:foreground ,fg3))))
|
||||
`(js3-warning-face ((,class (:underline ,keyword))))
|
||||
`(js3-error-face ((,class (:underline ,warning))))
|
||||
`(js3-external-variable-face ((,class (:foreground ,var))))
|
||||
`(js3-function-param-face ((,class (:foreground ,fg2))))
|
||||
`(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
|
||||
`(js3-instance-member-face ((,class (:foreground ,const))))
|
||||
`(warning ((,class (:foreground ,warning))))
|
||||
`(ac-completion-face ((,class (:underline t :foreground ,keyword))))
|
||||
`(info-quoted-name ((,class (:foreground ,builtin))))
|
||||
`(info-string ((,class (:foreground ,str))))
|
||||
`(icompletep-determined ((,class :foreground ,builtin)))
|
||||
`(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
|
||||
`(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
|
||||
`(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
|
||||
`(undo-tree-visualizer-register-face ((,class :foreground ,type)))
|
||||
`(slime-repl-inputed-output-face ((,class (:foreground ,type))))
|
||||
`(trailing-whitespace ((,class :foreground ,unspec :background ,warning)))
|
||||
`(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1)))
|
||||
`(rainbow-delimiters-depth-2-face ((,class :foreground ,type)))
|
||||
`(rainbow-delimiters-depth-3-face ((,class :foreground ,var)))
|
||||
`(rainbow-delimiters-depth-4-face ((,class :foreground ,const)))
|
||||
`(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword)))
|
||||
`(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1)))
|
||||
`(rainbow-delimiters-depth-7-face ((,class :foreground ,type)))
|
||||
`(rainbow-delimiters-depth-8-face ((,class :foreground ,var)))
|
||||
`(magit-item-highlight ((,class :background ,bg3)))
|
||||
`(magit-section-heading ((,class (:foreground ,keyword :weight bold))))
|
||||
`(magit-hunk-heading ((,class (:background ,bg3))))
|
||||
`(magit-section-highlight ((,class (:background ,bg2))))
|
||||
`(magit-hunk-heading-highlight ((,class (:background ,bg3))))
|
||||
`(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
|
||||
`(magit-diffstat-added ((,class (:foreground ,type))))
|
||||
`(magit-diffstat-removed ((,class (:foreground ,var))))
|
||||
`(magit-process-ok ((,class (:foreground ,func :weight bold))))
|
||||
`(magit-process-ng ((,class (:foreground ,warning :weight bold))))
|
||||
`(magit-branch ((,class (:foreground ,const :weight bold))))
|
||||
`(magit-log-author ((,class (:foreground ,fg3))))
|
||||
`(magit-hash ((,class (:foreground ,fg2))))
|
||||
`(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3))))
|
||||
`(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3))))
|
||||
`(term ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(term-color-black ((,class (:foreground ,bg3 :background ,bg3))))
|
||||
`(term-color-blue ((,class (:foreground ,func :background ,func))))
|
||||
`(term-color-red ((,class (:foreground ,keyword :background ,bg3))))
|
||||
`(term-color-green ((,class (:foreground ,type :background ,bg3))))
|
||||
`(term-color-yellow ((,class (:foreground ,var :background ,var))))
|
||||
`(term-color-magenta ((,class (:foreground ,builtin :background ,builtin))))
|
||||
`(term-color-cyan ((,class (:foreground ,str :background ,str))))
|
||||
`(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
|
||||
`(rainbow-delimiters-unmatched-face ((,class :foreground ,warning)))
|
||||
`(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil))))
|
||||
`(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight bold))))
|
||||
`(helm-selection ((,class (:background ,bg2 :underline nil))))
|
||||
`(helm-selection-line ((,class (:background ,bg2))))
|
||||
`(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3))))
|
||||
`(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1))))
|
||||
`(helm-separator ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-time-zone-home ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight bold))))
|
||||
`(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal))))
|
||||
`(helm-ff-executable ((,class (:foreground ,var :background ,bg1 :weight normal))))
|
||||
`(helm-ff-invalid-symlink ((,class (:foreground ,warning2 :background ,bg1 :weight bold))))
|
||||
`(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight bold))))
|
||||
`(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal))))
|
||||
`(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1))))
|
||||
`(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-match ((,class (:foreground ,unspec :background ,unspec :inherit helm-match))))
|
||||
`(helm-grep-running ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-source-go-package-godoc-description ((,class (:foreground ,str))))
|
||||
`(helm-bookmark-w3m ((,class (:foreground ,type))))
|
||||
`(company-echo-common ((,class (:foreground ,bg1 :background ,fg1))))
|
||||
`(company-preview ((,class (:background ,bg1 :foreground ,var))))
|
||||
`(company-preview-common ((,class (:foreground ,bg2 :foreground ,fg3))))
|
||||
`(company-preview-search ((,class (:foreground ,type :background ,bg1))))
|
||||
`(company-scrollbar-bg ((,class (:background ,bg3))))
|
||||
`(company-scrollbar-fg ((,class (:foreground ,keyword))))
|
||||
`(company-tooltip ((,class (:foreground ,fg2 :background ,bg2 :bold t))))
|
||||
`(company-tooltop-annotation ((,class (:foreground ,const))))
|
||||
`(company-tooltip-common ((,class ( :foreground ,fg3))))
|
||||
`(company-tooltip-common-selection ((,class (:foreground ,str))))
|
||||
`(company-tooltip-mouse ((,class (:inherit highlight))))
|
||||
`(company-tooltip-selection ((,class (:background ,bg3 :foreground ,fg3))))
|
||||
`(company-template-field ((,class (:inherit region))))
|
||||
`(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face))))
|
||||
`(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face))))
|
||||
`(web-mode-keyword-face ((,class (:foreground ,keyword))))
|
||||
`(web-mode-doctype-face ((,class (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face))))
|
||||
`(web-mode-string-face ((,class (:foreground ,str))))
|
||||
`(web-mode-type-face ((,class (:inherit ,font-lock-type-face))))
|
||||
`(web-mode-html-attr-name-face ((,class (:foreground ,func))))
|
||||
`(web-mode-html-attr-value-face ((,class (:foreground ,keyword))))
|
||||
`(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face))))
|
||||
`(web-mode-html-tag-face ((,class (:foreground ,builtin))))
|
||||
`(jde-java-font-lock-package-face ((t (:foreground ,var))))
|
||||
`(jde-java-font-lock-public-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-private-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-constant-face ((t (:foreground ,const))))
|
||||
`(jde-java-font-lock-modifier-face ((t (:foreground ,fg2))))
|
||||
`(jde-jave-font-lock-protected-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-number-face ((t (:foreground ,var))))
|
||||
`(yas-field-highlight-face ((t (:background ,selection)))))
|
||||
;; Legacy
|
||||
(if (< emacs-major-version 22)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(show-paren-match-face ((,class (:background ,warning))))) ;; obsoleted in 22.1, removed 2016
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(show-paren-match ((,class (:foreground ,bg1 :background ,str))))
|
||||
`(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning))))))
|
||||
;; emacs >= 26.1
|
||||
(when (>= emacs-major-version 26)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(line-number ((t (:inherit fringe))))
|
||||
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||
|
||||
;; emacs >= 27.1
|
||||
(when (>= emacs-major-version 27)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||
(when (>= emacs-major-version 28)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(line-number ((t (:inherit fringe))))
|
||||
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||
;; emacs >= 27.1
|
||||
(when (>= emacs-major-version 27)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||
(when (>= emacs-major-version 28)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(tab-line-tab-modified ((,class (:foreground ,warning2 :weight bold))))))
|
||||
(when (boundp 'font-lock-regexp-face)
|
||||
(custom-theme-set-faces
|
||||
'dtmacs
|
||||
`(font-lock-regexp-face ((,class (:inherit font-lock-string-face :underline t)))))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'dtmacs)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
;;; dtmacs-theme.el ends here
|
||||
Reference in New Issue
Block a user