Elpaca use-package kewyword rework

This commit is contained in:
MitchMarq42 2023-02-23 12:50:19 -09:00
parent 94e38169b8
commit 1db6dceaf0
2 changed files with 238 additions and 163 deletions

View File

@ -58,9 +58,11 @@
;; (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'use-package) (setq straight-use-package-by-default t) ;; (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'use-package) (setq straight-use-package-by-default t)
;; actually, use elpaca instead ;; actually, use elpaca instead
(require 'elpaca-bootstrap) (elpaca use-package (require 'use-package) (require 'elpaca-bootstrap)
(elpaca-use-package-mode) (elpaca elpaca-use-package
(setq elpaca-use-package-by-default t)) (elpaca-use-package-mode)
(setq elpaca-use-package-by-default t))
(elpaca-wait)
(require 'mitch-packages) (require 'mitch-packages)

View File

@ -6,44 +6,44 @@
;; ----------------------------------------------------------------------------- ;; -----------------------------------------------------------------------------
;;; Code: ;;; Code:
(elpaca nil (use-package emacs
(use-package emacs :elpaca nil
:custom :custom
(scroll-margin 2) (scroll-margin 2)
(scroll-conservatively 100) (scroll-conservatively 100)
(scroll-up-aggressively 0.01) (scroll-up-aggressively 0.01)
(scroll-down-aggressively 0.01) (scroll-down-aggressively 0.01)
(auto-window-vscroll nil) (auto-window-vscroll nil)
:init :init
(global-visual-line-mode t) (global-visual-line-mode t)
(set-language-environment "UTF-8") (set-language-environment "UTF-8")
(global-prettify-symbols-mode 1))) (global-prettify-symbols-mode 1))
;; diminish ;; diminish
(elpaca-use-package diminish) (use-package diminish)
(elpaca-use-package compat) (use-package compat)
(elpaca-use-package eldoc (use-package eldoc
:ensure nil :elpaca nil
:diminish :diminish
:defer 1 :defer 1
:custom (eldoc-echo-area-use-multiline-p nil)) :custom (eldoc-echo-area-use-multiline-p nil))
;; save minibuffer history, see Vertico below ;; save minibuffer history, see Vertico below
(elpaca-use-package savehist (use-package savehist
:ensure nil :elpaca nil
:init (savehist-mode) :init (savehist-mode)
:custom (savehist-file :custom (savehist-file
(expand-file-name "minibuffer-history" backup-directory))) (expand-file-name "minibuffer-history" backup-directory)))
;; save place in all files ;; save place in all files
(elpaca-use-package saveplace (use-package saveplace
:ensure nil :elpaca nil
:init (save-place-mode t) :init (save-place-mode t)
:custom :custom
(save-place-file (save-place-file
(expand-file-name "file-position-save" backup-directory))) (expand-file-name "file-position-save" backup-directory)))
(elpaca-use-package tramp (use-package tramp
:ensure nil :elpaca nil
;; :after eshell ;; :after eshell
:custom (tramp-persistency-file-name :custom (tramp-persistency-file-name
(expand-file-name "tramp-history" backup-directory)) (expand-file-name "tramp-history" backup-directory))
@ -54,8 +54,8 @@
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
(advice-add #'find-file :after #'find-file-sudo)) (advice-add #'find-file :after #'find-file-sudo))
;; Visualize whitespace. In a very chill and invisible way. ;; Visualize whitespace. In a very chill and invisible way.
(elpaca-use-package whitespace (use-package whitespace
:ensure nil :elpaca nil
:diminish (whitespace-mode org-indent-mode org-vw-mode auto-fill-mode) :diminish (whitespace-mode org-indent-mode org-vw-mode auto-fill-mode)
:custom :custom
(whitespace-style '(face lines-tail)) (whitespace-style '(face lines-tail))
@ -64,14 +64,15 @@
:hook :hook
(prog-mode . whitespace-mode) (prog-mode . whitespace-mode)
(org-mode . auto-fill-mode)) (org-mode . auto-fill-mode))
(elpaca-use-package image-mode (use-package image-mode
:ensure nil :elpaca nil
:config :config
(turn-off-line-numbers) (turn-off-line-numbers)
(blink-cursor-mode -1)) (blink-cursor-mode -1))
;; scribble SVGs in org buffers like it's 2005 (idk I was a baby then) ;; scribble SVGs in org buffers like it's 2005 (idk I was a baby then)
(elpaca-use-package (edraw (use-package edraw
:elpaca (edraw
:repo "https://github.com/misohena/el-easydraw") :repo "https://github.com/misohena/el-easydraw")
:after org :after org
:config :config
@ -79,20 +80,22 @@
(edraw-org-setup-default)) (edraw-org-setup-default))
;; ...and finally, sync files with disk changes ;; ...and finally, sync files with disk changes
(elpaca-use-package autorevert (use-package autorevert
:ensure nil :elpaca nil
:diminish auto-revert-mode :diminish auto-revert-mode
:config (global-auto-revert-mode)) :config (global-auto-revert-mode))
;; Keybinding manager ;; Keybinding manager
(elpaca-use-package general (use-package general
:demand t
:custom (default-input-method "japanese") :custom (default-input-method "japanese")
:config (mitch/general-config)) :config (mitch/general-config))
(elpaca-wait)
;; (elpaca-use-package use-package-ensure-system-package) ;; (use-package use-package-ensure-system-package)
;; load evil ;; load evil
(elpaca-use-package evil (use-package evil
:general :general
;; Visual lines. Redefined for auto-scrolling madness. ;; Visual lines. Redefined for auto-scrolling madness.
(general-define-key (general-define-key
@ -123,22 +126,22 @@
(quote undo-fu))) (quote undo-fu)))
:init (evil-mode t) :init (evil-mode t)
:config (mitch/evil-config)) :config (mitch/evil-config))
(elpaca-use-package evil-collection (use-package evil-collection
:after evil :after evil
:diminish evil-collection-unimpaired-mode :diminish evil-collection-unimpaired-mode
:config (evil-collection-init)) :config (evil-collection-init))
(elpaca-use-package evil-commentary (use-package evil-commentary
:diminish 'evil-commentary-mode :diminish 'evil-commentary-mode
:config (evil-commentary-mode) :config (evil-commentary-mode)
:hook (prog-mode . evil-commentary-mode)) :hook (prog-mode . evil-commentary-mode))
(elpaca-use-package evil-surround (use-package evil-surround
:diminish 'global-evil-surround-mode :diminish 'global-evil-surround-mode
:hook (prog-mode . evil-surround-mode) :hook (prog-mode . evil-surround-mode)
:config (global-evil-surround-mode 1)) :config (global-evil-surround-mode 1))
(elpaca-use-package evil-matchit (use-package evil-matchit
:diminish 'evil-matchit-mode :diminish 'evil-matchit-mode
:config (global-evil-matchit-mode 1)) :config (global-evil-matchit-mode 1))
(elpaca-use-package evil-terminal-cursor-changer (use-package evil-terminal-cursor-changer
:after evil :after evil
:diminish :diminish
:if (not (display-graphic-p)) :if (not (display-graphic-p))
@ -151,18 +154,19 @@
:config :config
(evil-terminal-cursor-changer-activate) (evil-terminal-cursor-changer-activate)
(xterm-mouse-mode)) (xterm-mouse-mode))
(elpaca-use-package undo-fu (use-package undo-fu
:after evil :after evil
:if (< (string-to-number emacs-version) 28) :if (< (string-to-number emacs-version) 28)
:diminish) :diminish)
(elpaca-use-package evil-goggles (use-package evil-goggles
:diminish :diminish
:after evil :after evil
:init (evil-goggles-mode) :init (evil-goggles-mode)
:custom-face :custom-face
(evil-goggles-default-face (evil-goggles-default-face
((t (:background "#303030" :foreground "#2233aa"))))) ((t (:background "#303030" :foreground "#2233aa")))))
(elpaca-use-package (altcaps (use-package altcaps
:elpaca (altcaps
:host github :host github
:repo "protesilaos/altcaps") :repo "protesilaos/altcaps")
:general (general-define-key :general (general-define-key
@ -170,14 +174,19 @@
"`" 'altcaps-region)) "`" 'altcaps-region))
;; eshell. Pretty good actually. ;; eshell. Pretty good actually.
(elpaca-use-package eshell (use-package eshell
:ensure nil :elpaca nil
:commands (eshell/emacs eshell/man) :commands (eshell/emacs eshell/man)
;; :init
;; (defun eshell-banner-initialize ()
;; "Run Neofetch in eshell."
;; (eshell/ls nil))
:custom :custom
(eshell-scroll-to-bottom-on-input t) (eshell-scroll-to-bottom-on-input t)
(eshell-hist-ignoredups t) (eshell-hist-ignoredups t)
(eshell-history-file-name nil) (eshell-history-file-name nil)
(eshell-history-size nil) (eshell-history-size nil)
(setq eshell-banner-message "\n\n")
:config :config
(add-to-list 'eshell-modules-list 'eshell-rebind) (add-to-list 'eshell-modules-list 'eshell-rebind)
(add-to-list 'eshell-modules-list 'eshell-hist) (add-to-list 'eshell-modules-list 'eshell-hist)
@ -233,7 +242,8 @@ If the current window occupies the whole frame, split it."
(advice-add 'evil-collection-eshell-setup-keys (advice-add 'evil-collection-eshell-setup-keys
:after 'mitch/eshell-setup-keys)) :after 'mitch/eshell-setup-keys))
;; show command that caused last scrollback in eshell etc ;; show command that caused last scrollback in eshell etc
(elpaca-use-package (sticky-shell (use-package sticky-shell
:elpaca (sticky-shell
:host github :host github
:repo "andyjda/sticky-shell") :repo "andyjda/sticky-shell")
:after eshell :after eshell
@ -253,51 +263,62 @@ If the current window occupies the whole frame, split it."
;; https://emacs.ch/@bram85/109612654687707030 ;; https://emacs.ch/@bram85/109612654687707030
(defun mitch/esh-outline-setup () (defun mitch/esh-outline-setup ()
(outline-minor-mode) (outline-minor-mode)
(diminish 'outline-minor-mode)
(setq-local outline-regexp eshell-prompt-regexp)) (setq-local outline-regexp eshell-prompt-regexp))
(add-hook 'eshell-mode-hook #'mitch/esh-outline-setup)) (add-hook 'eshell-mode-hook #'mitch/esh-outline-setup))
(use-package eat
(elpaca-use-package (eat :elpaca (eat :type git
:repo "https://codeberg.org/akib/emacs-eat" :host codeberg
:files ("*.el" ("term" "term/*.el") "*.texi" :repo "akib/emacs-eat"
"*.ti" ("terminfo/e" "terminfo/e/*") :files ("*.el" ("term" "term/*.el") "*.texi"
("terminfo/65" "terminfo/65/*") "*.ti" ("terminfo/e" "terminfo/e/*")
("integration" "integration/*") ("terminfo/65" "terminfo/65/*")
(:exclude ".dir-locals.el" "*-tests.el"))) ("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))
:custom :custom
(eat-kill-buffer-on-exit t) (eat-kill-buffer-on-exit t)
:hook :hook
(eshell-mode . eat-eshell-visual-command-mode) (eshell-mode . eat-eshell-visual-command-mode)
(eshell-mode . eat-eshell-mode)
(eat-mode . evil-insert-state)) (eat-mode . evil-insert-state))
(elpaca-use-package hide-mode-line (use-package hide-mode-line
:commands (hide-mode-line-mode)) :commands (hide-mode-line-mode))
;; (elpaca-use-package eshell-vterm ;; (use-package eshell-vterm
;; :after eshell ;; :after eshell
;; :custom (eshell-destroy-buffer-when-process-dies t) ;; :custom (eshell-destroy-buffer-when-process-dies t)
;; :hook (eshell-mode . eshell-vterm-mode)) ;; :hook (eshell-mode . eshell-vterm-mode))
(elpaca-use-package eshell-syntax-highlighting (use-package eshell-syntax-highlighting
:after eshell :after eshell
:hook (eshell-mode . eshell-syntax-highlighting-mode)) :hook (eshell-mode . eshell-syntax-highlighting-mode))
(elpaca-use-package (eshell-dat (use-package eshell-dat
:elpaca (eshell-dat
:repo "https://git.mitchmarq42.xyz/mitch/eshell-dat") :repo "https://git.mitchmarq42.xyz/mitch/eshell-dat")
:after eshell) :after eshell)
(elpaca-use-package (ansilove (use-package ansilove
:elpaca (ansilove
:host gitlab :host gitlab
:repo "xgqt/emacs-ansilove") :repo "xgqt/emacs-ansilove")
:commands ansilove) :commands ansilove)
(elpaca-use-package eshell-prompt-extras (use-package gitstatus
:elpaca (gitstatus
:host github
:repo "igorepst/gitstatus-el")
:custom (gitstatusd-exe "~/.cache/gitstatus/gitstatusd-linux-x86_64")
:after eshell :after eshell
:custom :init (add-hook 'eshell-before-prompt-hook #'gitstatus-eshell-start))
(eshell-highlight-prompt nil) (use-package p11k
(eshell-prompt-function 'epe-theme-multiline-with-status) :elpaca (p11k
(epe-path-style 'full)) :repo "https://git.mitchmarq42.xyz/mitch/p11k-el")
:after eshell
:hook (eshell-mode . p11k-mode))
;; File manager. Only breaks when you brag about how it doesn't. ;; File manager. Only breaks when you brag about how it doesn't.
(elpaca-use-package (use-package all-the-icons
(all-the-icons :post-build :elpaca (all-the-icons :post-build
("emacsclient" "--eval '(all-the-icons-install-fonts t)'"))) ("emacsclient" "--eval '(all-the-icons-install-fonts t)'")))
(use-package dirvish
(elpaca-use-package (dirvish :elpaca (dirvish
:files (:defaults "extensions/*.el")) :files (:defaults "extensions/*.el"))
:defer 0.5 :defer 0.5
:commands dirvish :commands dirvish
@ -308,7 +329,7 @@ If the current window occupies the whole frame, split it."
(dirvish-side-display-alist '((window-width . 0.15) (dirvish-side-display-alist '((window-width . 0.15)
(slot . -1) (slot . -1)
(side . left))) (side . left)))
:init (dirvish-override-dired-mode t) ;; :init (dirvish-override-dired-mode t)
:config :config
(general-define-key (general-define-key
:states 'normal :states 'normal
@ -325,7 +346,8 @@ If the current window occupies the whole frame, split it."
"t" 'dirvish-side)) "t" 'dirvish-side))
;; Completion framework... ;; Completion framework...
(elpaca-use-package (vertico (use-package vertico
:elpaca (vertico
:files (:defaults "extensions/vertico-mouse.el")) :files (:defaults "extensions/vertico-mouse.el"))
:custom (vertico-resize t) :custom (vertico-resize t)
:init (vertico-mode t) :init (vertico-mode t)
@ -349,12 +371,13 @@ see https://www.reddit.com/r/emacs/comments/xq6rpa/comment/iqynyu9/?utm_source=
"DEL" 'backspace-in-minibuffer)) "DEL" 'backspace-in-minibuffer))
(elpaca nil (elpaca nil
(use-package vertico-mouse (use-package vertico-mouse
:ensure nil :elpaca nil
;; :straight vertico ;; :straight vertico
:after vertico :after vertico
:config :config
(vertico-mouse-mode))) (vertico-mouse-mode)))
(elpaca-use-package (app-launcher (use-package app-launcher
:elpaca (app-launcher
:host github :repo "SebastienWae/app-launcher") :host github :repo "SebastienWae/app-launcher")
:after vertico :after vertico
:config :config
@ -376,15 +399,15 @@ behaviour. Delete the frame after that command has exited"
(app-launcher-run-app) (app-launcher-run-app)
(delete-frame))))) (delete-frame)))))
(elpaca-use-package consult (use-package consult
:after vertico :after vertico
:general :general
(general-define-key (general-define-key
[remap switch-to-buffer] 'consult-buffer)) [remap switch-to-buffer] 'consult-buffer))
;; Minibuffer generic stuff ;; Minibuffer generic stuff
(elpaca-use-package marginalia (use-package marginalia
:init (marginalia-mode)) :init (marginalia-mode))
(elpaca-use-package orderless (use-package orderless
:custom :custom
(completion-styles '(orderless partial-completion basic)) (completion-styles '(orderless partial-completion basic))
(completion-category-defaults nil) (completion-category-defaults nil)
@ -392,7 +415,7 @@ behaviour. Delete the frame after that command has exited"
(completion-category-overrides nil)) (completion-category-overrides nil))
;; weird multi-path thing ;; weird multi-path thing
(elpaca-use-package embark (use-package embark
:general :general
(general-define-key (general-define-key
:keymap minibuffer-mode-map :keymap minibuffer-mode-map
@ -432,10 +455,10 @@ targets."
:around #'embark-hide-which-key-indicator) :around #'embark-hide-which-key-indicator)
:custom (enable-recursive-minibuffers t)) :custom (enable-recursive-minibuffers t))
;; Consult users will also want the embark-consult package. ;; Consult users will also want the embark-consult package.
(elpaca-use-package embark-consult) (use-package embark-consult)
;; SORTA WORKING: Relative line numbers with stuff ;; SORTA WORKING: Relative line numbers with stuff
(elpaca-use-package nlinum-relative (use-package nlinum-relative
:custom :custom
(nlinum-relative-redisplay-delay 0) (nlinum-relative-redisplay-delay 0)
:hook (prog-mode . nlinum-relative-mode) :hook (prog-mode . nlinum-relative-mode)
@ -470,7 +493,7 @@ targets."
(add-hook 'minibuffer-exit-hook #'mitch/nlinum-buffer-setup)) (add-hook 'minibuffer-exit-hook #'mitch/nlinum-buffer-setup))
;; broken terminal that doesn't compile but at least it's fast when it does ;; broken terminal that doesn't compile but at least it's fast when it does
(elpaca-use-package vterm (use-package vterm
:custom :custom
(vterm-always-compile-module t) (vterm-always-compile-module t)
(vterm-module-cmake-args "-DUSE_SYSTEM_LIBVTERM=no") (vterm-module-cmake-args "-DUSE_SYSTEM_LIBVTERM=no")
@ -506,7 +529,7 @@ targets."
:hook :hook
(vterm-mode . mitch/terminal-setup) (vterm-mode . mitch/terminal-setup)
(vterm-exit-functions . save-buffers-kill-terminal)) (vterm-exit-functions . save-buffers-kill-terminal))
(elpaca-use-package multi-vterm (use-package multi-vterm
:commands (multi-vterm multi-vterm-other-window) :commands (multi-vterm multi-vterm-other-window)
:config :config
(defun multi-vterm-other-window () (defun multi-vterm-other-window ()
@ -526,13 +549,13 @@ targets."
"v" 'multi-vterm-other-window)) "v" 'multi-vterm-other-window))
;; Better modeline? Better modeline. ;; Better modeline? Better modeline.
(elpaca-use-package powerline (use-package powerline
:custom :custom
(powerline-display-buffer-size nil) (powerline-display-buffer-size nil)
(powerline-default-separator 'utf-8) (powerline-default-separator 'utf-8)
(powerline-utf-8-separator-left (string-to-char "")) (powerline-utf-8-separator-left (string-to-char ""))
(powerline-utf-8-separator-right (string-to-char ""))) (powerline-utf-8-separator-right (string-to-char "")))
(elpaca-use-package airline-themes (use-package airline-themes
:custom :custom
(airline-cursor-colors nil) (airline-cursor-colors nil)
(airline-display-directory t) (airline-display-directory t)
@ -548,19 +571,20 @@ targets."
;; Custom Theme. ;; Custom Theme.
;; Not to be confused with a color theme, or a color scheme, or a custom scheme. ;; Not to be confused with a color theme, or a color scheme, or a custom scheme.
(elpaca-use-package (sv-theme (use-package sv-theme
:elpaca (sv-theme
:repo :repo
"https://git.mitchmarq42.xyz/mitch/vimcolors") "https://git.mitchmarq42.xyz/mitch/vimcolors")
:config :config
(mitch/visual-setup) (mitch/visual-setup)
(load-theme 'airline-ravenpower t) (load-theme 'airline-ravenpower t)
:init (load-theme 'sv t)) :init (load-theme 'sv t))
;; (elpaca-use-package doom-themes ;; (use-package doom-themes
;; :config (mitch/visual-setup) ;; :config (mitch/visual-setup)
;; (load-theme 'airline-ravenpower t) ;; (load-theme 'airline-ravenpower t)
;; :init (load-theme 'doom-acario-dark t)) ;; :init (load-theme 'doom-acario-dark t))
(elpaca-use-package yascroll (use-package yascroll
:diminish :diminish
:defer 1 :defer 1
;; :if (not (display-graphic-p)) ;; :if (not (display-graphic-p))
@ -590,30 +614,32 @@ targets."
) )
;; parentheses settingses ;; parentheses settingses
(elpaca-use-package (paredit :depth nil) (elpaca (paredit :depth nil)
;; elpaca declaration is broken, I just cloned it manually to .config/emacs/elpaca/repos (use-package paredit
;; see my issue https://github.com/progfolio/elpaca/issues/40 :elpaca nil
:diminish ;; elpaca declaration is broken, I just cloned it manually to .config/emacs/elpaca/repos
:general (general-define-key ;; see my issue https://github.com/progfolio/elpaca/issues/40
"M-j" 'paredit-forward-slurp-sexp :diminish
"M-k" 'paredit-forward-barf-sexp :general (general-define-key
"M-h" 'paredit-backward-barf-sexp "M-j" 'paredit-forward-slurp-sexp
"M-l" 'paredit-backward-slurp-sexp) "M-k" 'paredit-forward-barf-sexp
:hook (prog-mode . paredit-mode) "M-h" 'paredit-backward-barf-sexp
:init "M-l" 'paredit-backward-slurp-sexp)
(show-paren-mode 1) :hook (prog-mode . paredit-mode)
(paredit-mode 1) :init
(electric-pair-mode 1) (show-paren-mode 1)
:custom (paredit-mode 1)
(show-paren-delay 0) (electric-pair-mode 1)
(show-paren-style 'parenthesis)) :custom
(elpaca-use-package evil-paredit (show-paren-delay 0)
(show-paren-style 'parenthesis)))
(use-package evil-paredit
:after paredit :after paredit
:hook (evil-mode . evil-paredit-mode)) :hook (evil-mode . evil-paredit-mode))
;; org mode and messy things ;; org mode and messy things
(elpaca-use-package org (use-package org
:ensure nil :elpaca nil
:diminish (org-indent-mode org-vw-mode) :diminish (org-indent-mode org-vw-mode)
:custom :custom
;; (org-hide-leading-stars t) ;; (org-hide-leading-stars t)
@ -670,21 +696,22 @@ See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode
:states 'normal :states 'normal
:keymaps 'org-src-mode-map :keymaps 'org-src-mode-map
"ZZ" 'org-edit-src-exit)) "ZZ" 'org-edit-src-exit))
(elpaca-use-package (org-block-capf (use-package org-block-capf
:elpaca (org-block-capf
:host github :host github
:repo "xenodium/org-block-capf") :repo "xenodium/org-block-capf")
:after org :after org
:init (add-hook 'org-mode-hook :init (add-hook 'org-mode-hook
#'org-block-capf-add-to-completion-at-point-functions)) #'org-block-capf-add-to-completion-at-point-functions))
(elpaca-use-package org-tempo (use-package org-tempo
:ensure nil :elpaca nil
:after org :after org
:config :config
(add-to-list 'org-structure-template-alist '("sh" . "src shell")) (add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src elisp")) (add-to-list 'org-structure-template-alist '("el" . "src elisp"))
(add-to-list 'org-structure-template-alist '("html" . "src html"))) (add-to-list 'org-structure-template-alist '("html" . "src html")))
;; (elpaca-use-package org-variable-pitch ;; (use-package org-variable-pitch
;; :after org ;; :after org
;; :if (display-graphic-p) ;; :if (display-graphic-p)
;; :diminish (buffer-face-mode org-variable-pitch-minor-mode) ;; :diminish (buffer-face-mode org-variable-pitch-minor-mode)
@ -692,7 +719,7 @@ See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode
;; ((nil (:inherit ;; ((nil (:inherit
;; (font-lock-comment-delimiter-face fixed-pitch))))) ;; (font-lock-comment-delimiter-face fixed-pitch)))))
;; :hook (org-mode . org-variable-pitch-minor-mode)) ;; :hook (org-mode . org-variable-pitch-minor-mode))
;; (elpaca-use-package org-appear ;; (use-package org-appear
;; :hook (org-mode . org-appear-mode) ;; :hook (org-mode . org-appear-mode)
;; :after org ;; :after org
;; :custom ;; :custom
@ -701,12 +728,13 @@ See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode
;; (org-appear-autoentities t) ;; (org-appear-autoentities t)
;; (org-appear-autokeywords t) ;; (org-appear-autokeywords t)
;; (org-appear-autosubmarkers t)) ;; (org-appear-autosubmarkers t))
(elpaca-use-package (org-pretty-table (use-package org-pretty-table
:elpaca (org-pretty-table
:host github :host github
:repo "Fuco1/org-pretty-table") :repo "Fuco1/org-pretty-table")
:diminish :diminish
:hook (org-mode . org-pretty-table-mode)) :hook (org-mode . org-pretty-table-mode))
(elpaca-use-package ox-hugo (use-package ox-hugo
:after org :after org
:config :config
(defun hugo-dir-above (dir) (defun hugo-dir-above (dir)
@ -742,40 +770,40 @@ Return nil if DIR is not in a hugo project at all."
(add-hook 'after-save-hook #'hugo-compile)) (add-hook 'after-save-hook #'hugo-compile))
;; fake indentation, other than the other fake indentation ;; fake indentation, other than the other fake indentation
;; (elpaca-use-package adaptive-wrap ;; (use-package adaptive-wrap
;; :custom (adaptive-wrap-extra-indent 2) ;; :custom (adaptive-wrap-extra-indent 2)
;; :hook (org-mode . adaptive-wrap-prefix-mode)) ;; :hook (org-mode . adaptive-wrap-prefix-mode))
;; cheaty key popups ;; cheaty key popups
(elpaca-use-package which-key (use-package which-key
:diminish :diminish
:defer 5 :defer 5
:custom (which-key-idle-delay 2.5) :custom (which-key-idle-delay 2.5)
:init (which-key-mode t)) :init (which-key-mode t))
;; parentheses are boring ;; parentheses are boring
(elpaca-use-package rainbow-delimiters (use-package rainbow-delimiters
:diminish :diminish
:defer 1 :defer 1
:hook (prog-mode . rainbow-delimiters-mode)) :hook (prog-mode . rainbow-delimiters-mode))
;; Hex colors ;; Hex colors
(elpaca-use-package rainbow-mode (use-package rainbow-mode
:diminish :diminish
:hook (prog-mode . rainbow-mode)) :hook (prog-mode . rainbow-mode))
;; Nobody loves a good language ;; Nobody loves a good language
(elpaca-use-package powershell (use-package powershell
:mode ("\\.ps1\\'" . powershell-mode)) :mode ("\\.ps1\\'" . powershell-mode))
;; or an okay language ;; or an okay language
(elpaca-use-package cider (use-package cider
:defer 1) :defer 1)
;; c sharp; taken from https://www.reddit.com/r/emacs/comments/k8tnzg/help_setting_up_c_lsp_omnisharproslyn/ ;; c sharp; taken from https://www.reddit.com/r/emacs/comments/k8tnzg/help_setting_up_c_lsp_omnisharproslyn/
;; (there is nothing here because I'm not using c sharp...) ;; (there is nothing here because I'm not using c sharp...)
(elpaca-use-package lsp-mode (use-package lsp-mode
:hook ((powershell-mode . lsp-mode) :hook ((powershell-mode . lsp-mode)
(lsp-mode . lsp-enable-which-key-integration) (lsp-mode . lsp-enable-which-key-integration)
(lsp-completion-mode . corfu/lsp-mode-setup-completion)) (lsp-completion-mode . corfu/lsp-mode-setup-completion))
@ -785,7 +813,8 @@ Return nil if DIR is not in a hugo project at all."
:init (defun corfu/lsp-mode-setup-completion () :init (defun corfu/lsp-mode-setup-completion ()
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
'(flex)))) '(flex))))
(elpaca-use-package (treesit-auto (use-package treesit-auto
:elpaca (treesit-auto
:host github :host github
:repo "renzmann/treesit-auto") :repo "renzmann/treesit-auto")
:custom (treesit-auto-install 'prompt) :custom (treesit-auto-install 'prompt)
@ -793,12 +822,12 @@ Return nil if DIR is not in a hugo project at all."
) )
;; broken snippets I don't care about... ;; broken snippets I don't care about...
(elpaca-use-package yasnippet (use-package yasnippet
:diminish yas-minor-mode :diminish yas-minor-mode
:hook (prog-mode . yas-minor-mode)) :hook (prog-mode . yas-minor-mode))
;; Better help-pages. Genuinely pretty great. ;; Better help-pages. Genuinely pretty great.
(elpaca-use-package helpful (use-package helpful
:general (general-define-key :general (general-define-key
[remap describe-key] 'helpful-key [remap describe-key] 'helpful-key
[remap describe-variable] 'helpful-variable [remap describe-variable] 'helpful-variable
@ -814,10 +843,11 @@ Return nil if DIR is not in a hugo project at all."
:custom (elisp-refs-verbose nil)) :custom (elisp-refs-verbose nil))
;; Better lisp highlighting? ;; Better lisp highlighting?
(elpaca-use-package highlight-defined (use-package highlight-defined
:hook (emacs-lisp-mode . highlight-defined-mode)) :hook (emacs-lisp-mode . highlight-defined-mode))
(elpaca-use-package relint) (use-package relint)
(elpaca-use-package (elisp-autofmt (use-package elisp-autofmt
:elpaca (elisp-autofmt
:host codeberg :host codeberg
:repo "ideasman42/emacs-elisp-autofmt" :repo "ideasman42/emacs-elisp-autofmt"
:files ("*")) :files ("*"))
@ -825,7 +855,7 @@ Return nil if DIR is not in a hugo project at all."
;; Shell linting? ;; Shell linting?
(elpaca-use-package flymake (use-package flymake
:diminish :diminish
:custom :custom
(flymake-note-bitmap '(right-arrow compilation-info)) (flymake-note-bitmap '(right-arrow compilation-info))
@ -834,11 +864,11 @@ Return nil if DIR is not in a hugo project at all."
:hook (prog-mode . flymake-mode)) :hook (prog-mode . flymake-mode))
;; Emacs startup profiling -- may not work with chemacs2 ;; Emacs startup profiling -- may not work with chemacs2
(elpaca-use-package esup (use-package esup
:commands esup) :commands esup)
;; Blingy laggy minimap on the right ;; Blingy laggy minimap on the right
(elpaca-use-package minimap (use-package minimap
:general (general-define-key :general (general-define-key
:states 'normal :states 'normal
:prefix-command 'mini-map-prefix :prefix-command 'mini-map-prefix
@ -856,12 +886,13 @@ Return nil if DIR is not in a hugo project at all."
((nil (:background "#afafaf" :extend t))))) ((nil (:background "#afafaf" :extend t)))))
;; epic drop-down completion ;; epic drop-down completion
;; (elpaca-use-package company ;; (use-package company
;; :diminish ;; :diminish
;; :custom ;(company-require-match nil) ;; :custom ;(company-require-match nil)
;; (company-tooltip-align-annotations t) ;; (company-tooltip-align-annotations t)
;; :hook (prog-mode . company-mode)) ;; :hook (prog-mode . company-mode))
(elpaca-use-package (corfu (use-package corfu
:elpaca (corfu
:files (:defaults "extensions/*.el")) :files (:defaults "extensions/*.el"))
;; :if (display-graphic-p) ; breaks in emacsclient ;; :if (display-graphic-p) ; breaks in emacsclient
:custom :custom
@ -878,7 +909,14 @@ Return nil if DIR is not in a hugo project at all."
(corfu-scroll-margin 5) ;; Use scroll margin (corfu-scroll-margin 5) ;; Use scroll margin
(completion-cycle-threshold 0) (completion-cycle-threshold 0)
(tab-always-indent 'complete) (tab-always-indent 'complete)
(tooltip-delay 0.01)
(use-system-tooltips nil)
(tooltip-hide-delay 60)
:custom-face
(tooltip
((t (:inherit 'corfu-default))))
:init (global-corfu-mode) :init (global-corfu-mode)
(tooltip-mode)
:config :config
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent) (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent)
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify) (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify)
@ -894,29 +932,31 @@ Return nil if DIR is not in a hugo project at all."
"C-f" 'corfu-info-location)) "C-f" 'corfu-info-location))
(elpaca nil (elpaca nil
(use-package corfu-echo (use-package corfu-echo
:ensure nil :elpaca corfu
:custom (corfu-echo-delay t) :custom (corfu-echo-delay t)
:after corfu :after corfu
:config (corfu-echo-mode))) :config (corfu-echo-mode)))
(elpaca nil (elpaca nil
(use-package corfu-history (use-package corfu-history
:ensure nil :elpaca corfu
:after corfu :after corfu
:config (corfu-history-mode))) :config (corfu-history-mode)))
(elpaca-use-package cape (use-package cape
:after corfu :after corfu
:init :init
(add-to-list 'completion-at-point-functions #'cape-dabbrev) (add-to-list 'completion-at-point-functions #'cape-dabbrev)
(add-to-list 'completion-at-point-functions #'cape-file) (add-to-list 'completion-at-point-functions #'cape-file)
(add-to-list 'completion-at-point-functions #'cape-ispell)) (add-to-list 'completion-at-point-functions #'cape-ispell))
(elpaca-use-package pcmpl-args (use-package pcmpl-args
:after eshell) :after eshell)
(elpaca-use-package (popon (use-package popon
:elpaca (popon
:type git :type git
:repo "https://codeberg.org/akib/emacs-popon") :repo "https://codeberg.org/akib/emacs-popon")
:if (not (display-graphic-p))) :if (not (display-graphic-p)))
(elpaca-use-package (corfu-terminal (use-package corfu-terminal
:elpaca (corfu-terminal
:type git :type git
:repo "https://codeberg.org/akib/emacs-corfu-terminal") :repo "https://codeberg.org/akib/emacs-corfu-terminal")
:after popon :after popon
@ -924,7 +964,7 @@ Return nil if DIR is not in a hugo project at all."
(display-graphic-p) (display-graphic-p)
(corfu-terminal-mode +1))) (corfu-terminal-mode +1)))
(elpaca-use-package magit (use-package magit
:commands (madots magit-status magit) :commands (madots magit-status magit)
:hook (magit-mode . turn-off-line-numbers) :hook (magit-mode . turn-off-line-numbers)
:custom (vc-follow-symlinks t) :custom (vc-follow-symlinks t)
@ -961,7 +1001,8 @@ Return nil if DIR is not in a hugo project at all."
(magit-status) (magit-status)
(run-with-timer 5 3 #'madots--cleanup))) (run-with-timer 5 3 #'madots--cleanup)))
(elpaca-use-package (hyperbole (use-package hyperbole
:elpaca (hyperbole
:files ("*.el" :files ("*.el"
("kotl" "kotl/*.el") ("kotl" "kotl/*.el")
"man/*.info" "man/*.texi") "man/*.info" "man/*.texi")
@ -971,11 +1012,13 @@ Return nil if DIR is not in a hugo project at all."
:states 'normal :states 'normal
"RET" 'hkey-either)) "RET" 'hkey-either))
(elpaca-use-package (dconf-mode (use-package dconf-mode
:elpaca (dconf-mode
:type git :type git
:repo "https://git.mitchmarq42.xyz/mitch/dconf-mode.el")) :repo "https://git.mitchmarq42.xyz/mitch/dconf-mode.el"))
(elpaca-use-package (info-variable-pitch (use-package info-variable-pitch
:elpaca (info-variable-pitch
:host github :host github
:repo "kisaragi-hiu/info-variable-pitch") :repo "kisaragi-hiu/info-variable-pitch")
:config :config
@ -983,7 +1026,7 @@ Return nil if DIR is not in a hugo project at all."
;; (elpaca nil ;; (elpaca nil
;; (use-package exwm ;; (use-package exwm
;; :ensure nil ;; :elpaca nil
;; :if (package-installed-p 'exwm) ;; :if (package-installed-p 'exwm)
;; :init ;; :init
;; (require 'exwm-config) ;; (require 'exwm-config)
@ -991,7 +1034,7 @@ Return nil if DIR is not in a hugo project at all."
(elpaca nil (elpaca nil
(use-package xwidget (use-package xwidget
:ensure nil :elpaca nil
:commands xwidget-webkit-browse-url :commands xwidget-webkit-browse-url
:config :config
(defun mitch/webkit-isearch () (defun mitch/webkit-isearch ()
@ -1017,19 +1060,20 @@ Return nil if DIR is not in a hugo project at all."
"n" 'mitch/webkit-isearch-next "n" 'mitch/webkit-isearch-next
"N" 'mitch/webkit-isearch-prev))) "N" 'mitch/webkit-isearch-prev)))
(elpaca-use-package (ani-el (use-package ani-el
:elpaca (ani-el
:repo "https://git.mitchmarq42.xyz/mitch/ani-el" :repo "https://git.mitchmarq42.xyz/mitch/ani-el"
:files ("ani-el.el" "lib"))) :files ("ani-el.el" "lib")))
(elpaca-use-package slime (use-package slime
:if (file-exists-p (expand-file-name "~/quicklisp/slime-helper.el")) :if (file-exists-p (expand-file-name "~/quicklisp/slime-helper.el"))
:commands (slime slime-connect) :commands (slime slime-connect)
:custom (inferior-lisp-program "sbcl") :custom (inferior-lisp-program "sbcl")
:config (load (expand-file-name "~/quicklisp/slime-helper.el"))) :config (load (expand-file-name "~/quicklisp/slime-helper.el")))
;; built in spell checker, for losers ;; built in spell checker, for losers
(elpaca-use-package flyspell (use-package flyspell
:ensure nil :elpaca nil
:diminish :diminish
:custom :custom
(flyspell-auto-correct-word t) (flyspell-auto-correct-word t)
@ -1037,23 +1081,23 @@ Return nil if DIR is not in a hugo project at all."
(org-mode . flyspell-mode)) (org-mode . flyspell-mode))
;; Java never looked so useful... ;; Java never looked so useful...
(elpaca-use-package clojure-mode (use-package clojure-mode
:mode "\\.cljs\\'") :mode "\\.cljs\\'")
(elpaca-use-package inf-clojure (use-package inf-clojure
:after clojure-mode) :after clojure-mode)
;; unique buffer names ;; unique buffer names
(elpaca-use-package uniquify (use-package uniquify
:ensure nil :elpaca nil
:custom (uniquify-buffer-name-style 'forward)) :custom (uniquify-buffer-name-style 'forward))
;; cache file cleanup ;; cache file cleanup
(elpaca-use-package kkc (use-package kkc
:ensure nil :elpaca nil
:custom (kkc-init-file-name (expand-file-name "kkcrc" backup-directory))) :custom (kkc-init-file-name (expand-file-name "kkcrc" backup-directory)))
;; see https://www.reddit.com/r/emacs/comments/xyo2fo/orgmode_vterm_tmux/ ;; see https://www.reddit.com/r/emacs/comments/xyo2fo/orgmode_vterm_tmux/
(elpaca-use-package ob-tmux (use-package ob-tmux
:after (org dash) :after (org dash)
:config :config
(setq org-src-lang-modes (-replace (setq org-src-lang-modes (-replace
@ -1069,7 +1113,8 @@ Return nil if DIR is not in a hugo project at all."
(org-babel-tmux-terminal "/home/mitch/.local/bin/emacs-term-shim.sh") (org-babel-tmux-terminal "/home/mitch/.local/bin/emacs-term-shim.sh")
(org-babel-tmux-terminal-opts)) (org-babel-tmux-terminal-opts))
(elpaca-use-package (dwim-shell-command (use-package dwim-shell-command
:elpaca (dwim-shell-command
:files (:defaults "dwim-shell-commands.el")) :files (:defaults "dwim-shell-commands.el"))
:config (require 'dwim-shell-commands) :config (require 'dwim-shell-commands)
:commands dwim-shell-commands-kill-process) :commands dwim-shell-commands-kill-process)
@ -1077,7 +1122,7 @@ Return nil if DIR is not in a hugo project at all."
;; https://laurencewarne.github.io/emacs/programming/2022/12/26/exploring-proced.html ;; https://laurencewarne.github.io/emacs/programming/2022/12/26/exploring-proced.html
(elpaca nil (elpaca nil
(use-package proced (use-package proced
:ensure nil :elpaca nil
:commands proced :commands proced
:custom :custom
(proced-auto-update-flag t) (proced-auto-update-flag t)
@ -1091,17 +1136,20 @@ Return nil if DIR is not in a hugo project at all."
'(custom user pid ppid sess tree pcpu pmem rss start time state '(custom user pid ppid sess tree pcpu pmem rss start time state
(args comm))))) (args comm)))))
(elpaca-use-package (youtube-sub-extractor (use-package youtube-sub-extractor
:elpaca (youtube-sub-extractor
:host github :host github
:repo "agzam/youtube-sub-extractor.el") :repo "agzam/youtube-sub-extractor.el")
:custom (youtube-sub-extractor-timestamps 'left-margin) :custom (youtube-sub-extractor-timestamps 'left-margin)
:commands youtube-sub-extractor-extract-subs) :commands youtube-sub-extractor-extract-subs)
;; Cheat sheet ;; Cheat sheet
(elpaca-use-package (cheat-sh :host github :repo "davep/cheat-sh.el") (use-package cheat-sh
:elpaca (cheat-sh :host github :repo "davep/cheat-sh.el")
:commands cheat-sh) :commands cheat-sh)
(elpaca-use-package (pcre2el (use-package pcre2el
:elpaca (pcre2el
:host github :host github
:repo "joddie/pcre2el") :repo "joddie/pcre2el")
:config :config
@ -1128,7 +1176,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html"
(guid (seq uuid))) (guid (seq uuid)))
(rxt-elisp-to-pcre (rx ,@expressions))))) (rxt-elisp-to-pcre (rx ,@expressions)))))
(elpaca-use-package org-modern (use-package org-modern
:after org :after org
:custom :custom
(org-modern-tag nil) (org-modern-tag nil)
@ -1153,7 +1201,8 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html"
:after #'mitch/org-grayify-stars) :after #'mitch/org-grayify-stars)
) )
(elpaca-use-package (svg-tag-mode (use-package svg-tag-mode
:elpaca (svg-tag-mode
:host github :host github
:repo "rougier/svg-tag-mode") :repo "rougier/svg-tag-mode")
;; :after org-modern ;; :after org-modern
@ -1173,13 +1222,37 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html"
:face 'org-block-begin-line))))))) :face 'org-block-begin-line)))))))
) )
(elpaca-use-package haskell-mode) (use-package haskell-mode)
(elpaca-use-package yuck-mode) (use-package yuck-mode)
(elpaca-use-package (klondike (use-package klondike
:elpaca (klondike
:host codeberg :host codeberg
:repo "WammKD/Emacs-Klondike") :repo "WammKD/Emacs-Klondike")
:commands klondike) :commands klondike)
;; disabled because error and useless
;; (use-package aggressive-indent
;; :after paredit
;; :commands aggressive-indent-mode
;; :hook (emacs-lisp-mode . aggresssive-indent-mode))
;; disabled because it breaks things and I don't care
(use-package perspective
:init (persp-mode)
:custom
(persp-suppress-no-prefix-key-warning t)
(persp-show-modestring nil)
;; :config
;; (consult-customize consult--source-buffer :hidden t :default nil)
;; (add-to-list 'consult-buffer-sources persp-consult-source)
)
(use-package perspective-tabs
:elpaca (perspective-tabs
:host sourcehut
:repo "woozong/perspective-tabs")
:after perspective
:init (perspective-tabs-mode +1))
(provide 'mitch-packages) (provide 'mitch-packages)
;;; mitch-packages.el ends here ;;; mitch-packages.el ends here