2021-11-22 05:57:41 +00:00
|
|
|
;;; init.el --- Emacs initiation file -*- lexical-binding: t -*-
|
2021-09-05 04:51:36 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Author: Case Duckworth <acdw@acdw.net>
|
2021-03-01 05:58:57 +00:00
|
|
|
;; Created: Sometime during Covid-19, 2020
|
2021-02-26 17:31:50 +00:00
|
|
|
;; Keywords: configuration
|
2021-03-08 04:14:38 +00:00
|
|
|
;; URL: https://tildegit.org/acdw/emacs
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Bankruptcy: 8
|
2021-03-16 16:16:21 +00:00
|
|
|
|
2021-04-10 19:28:31 +00:00
|
|
|
;;; License:
|
2021-09-05 04:51:36 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Everyone is permitted to do whatever they like with this software
|
|
|
|
;; without limitation. This software comes without any warranty
|
|
|
|
;; whatsoever, but with two pieces of advice:
|
2021-09-25 19:03:00 +00:00
|
|
|
;; - Be kind to yourself.
|
2021-03-01 05:58:57 +00:00
|
|
|
;; - Make good choices.
|
2021-03-16 16:16:21 +00:00
|
|
|
|
2021-09-25 19:03:00 +00:00
|
|
|
;;; Code:
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-12-06 04:37:11 +00:00
|
|
|
(require 'early-init (locate-user-emacs-file "early-init.el") t)
|
2021-11-22 05:57:41 +00:00
|
|
|
(require 'private)
|
2021-12-05 05:09:33 +00:00
|
|
|
(setq debug-on-error t)
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-12-06 04:37:11 +00:00
|
|
|
(setup (:require +emacs)
|
|
|
|
;; +emacs.el contains super-basic defaults that are basically
|
|
|
|
;; necessary for good functioning. In this block, I add extra
|
|
|
|
;; things or more "experimental" ones that might not belong in a
|
|
|
|
;; separate file.
|
|
|
|
(:global "M-o" 'other-buffer
|
|
|
|
"C-x C-k" 'kill-this-buffer)
|
|
|
|
;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
|
|
|
|
(global-set-key (kbd "C-h") 'delete-backward-char)
|
|
|
|
(keyboard-translate ?\C-h ?\C-?))
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:require +init)
|
|
|
|
(:bind "C-c s" (lambda ()
|
|
|
|
(interactive)
|
|
|
|
(+init-sort)
|
|
|
|
(save-buffer)))
|
|
|
|
(:hook '+init-add-setup-to-imenu))
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-12-07 01:58:46 +00:00
|
|
|
(setup (:require +key)
|
|
|
|
(+key-global-mode +1))
|
|
|
|
|
2021-12-06 04:37:41 +00:00
|
|
|
(setup (:require auth-source)
|
|
|
|
(:option auth-sources (list (private/ "authinfo")
|
|
|
|
(private/ "authinfo.gpg")
|
|
|
|
"~/.authinfo"
|
|
|
|
"~/.authinfo.gpg")))
|
|
|
|
|
|
|
|
(setup (:require pulse)
|
|
|
|
(:also-load +pulse)
|
|
|
|
(:option pulse-flag nil
|
|
|
|
pulse-delay 0.5
|
|
|
|
pulse-iterations 1)
|
|
|
|
(+pulse-location-mode +1))
|
|
|
|
|
2021-07-01 00:34:06 +00:00
|
|
|
(setup calendar
|
2021-11-22 05:57:41 +00:00
|
|
|
(require '_location)
|
|
|
|
(:option calendar-location-name _location-name
|
|
|
|
calendar-latitude _location-latitude
|
|
|
|
calendar-longitude _location-longitude))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
|
|
|
(setup dired
|
|
|
|
(:also-load dired-x)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:also-straight dired-subtree
|
|
|
|
dired-collapse
|
|
|
|
dired-git-info
|
|
|
|
dired+)
|
2021-09-23 22:11:30 +00:00
|
|
|
(:option dired-recursive-copies 'top
|
|
|
|
dired-recursive-deletes 'top
|
|
|
|
dired-create-destination-dirs 'ask
|
2021-09-05 04:57:04 +00:00
|
|
|
delete-by-moving-to-trash t
|
|
|
|
dired-listing-switches "-Al"
|
|
|
|
ls-lisp-dirs-first t
|
|
|
|
dired-ls-F-marks-symlinks t
|
|
|
|
dired-no-confirm '(byte-compile
|
|
|
|
chgrp chmod chown copy
|
|
|
|
hardlink load move
|
|
|
|
shell touch symlink)
|
|
|
|
dired-dwim-target t)
|
2021-12-06 04:37:41 +00:00
|
|
|
(:bind "<backspace>" 'dired-up-directory
|
|
|
|
"TAB" 'dired-subtree-cycle
|
2021-11-22 05:57:41 +00:00
|
|
|
"i" 'dired-subtree-toggle
|
|
|
|
")" 'dired-git-info-mode)
|
|
|
|
(:hook 'dired-collapse-mode
|
|
|
|
'dired-hide-details-mode
|
|
|
|
'hl-line-mode)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-x C-j" 'dired-jump)
|
2021-09-04 15:38:06 +00:00
|
|
|
(with-eval-after-load 'dired
|
2021-11-22 05:57:41 +00:00
|
|
|
(pcase system-type
|
|
|
|
((or 'ms-dos 'windows-nt)
|
|
|
|
(:straight w32-browser))
|
|
|
|
((or 'gnu/linux)
|
|
|
|
(:straight dired-open)
|
|
|
|
(:option dired-listing-switches
|
|
|
|
(concat dired-listing-switches " -F")))))
|
|
|
|
(with-eval-after-load 'frowny
|
|
|
|
(add-to-list 'frowny-inhibit-modes 'dired-mode)))
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-12-05 05:09:33 +00:00
|
|
|
(setup eldoc
|
|
|
|
(:hook-into elisp-mode
|
|
|
|
lisp-interaction-mode))
|
|
|
|
|
|
|
|
(setup elisp-mode
|
|
|
|
(:also-load +elisp)
|
|
|
|
(:option eval-expression-print-length nil
|
|
|
|
eval-expression-print-level nil)
|
|
|
|
(:with-map (emacs-lisp-mode-map lisp-interaction-mode-map)
|
|
|
|
(:bind "C-c C-c" 'eval-defun
|
|
|
|
"C-c C-k" '+elisp-eval-region-or-buffer
|
|
|
|
"C-c C-z" 'ielm))
|
|
|
|
(advice-add 'eval-region :around '+eval-region@pulse))
|
|
|
|
|
2021-04-29 17:16:03 +00:00
|
|
|
(setup eshell
|
2021-11-22 05:57:41 +00:00
|
|
|
(:also-load +eshell
|
2021-09-06 17:51:48 +00:00
|
|
|
em-smart
|
|
|
|
em-tramp)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:option eshell-aliases-file (.etc "eshell/aliases" t)
|
2021-09-06 17:51:48 +00:00
|
|
|
eshell-destroy-buffer-when-process-dies t
|
2021-11-22 05:57:41 +00:00
|
|
|
eshell-directory-name (.etc "eshell/" t)
|
2021-09-06 17:51:48 +00:00
|
|
|
eshell-error-if-no-glob t
|
|
|
|
eshell-hist-ignore-dups t
|
2021-05-30 05:07:02 +00:00
|
|
|
eshell-kill-on-exit nil
|
2021-11-22 05:57:41 +00:00
|
|
|
eshell-prefer-lisp-functions t
|
|
|
|
eshell-prefer-lisp-variables t
|
2021-05-30 05:07:02 +00:00
|
|
|
eshell-review-quick-commands nil
|
2021-09-06 17:51:48 +00:00
|
|
|
eshell-save-history-on-exit t
|
|
|
|
eshell-scroll-to-bottom-on-input 'all
|
2021-05-30 05:07:02 +00:00
|
|
|
eshell-smart-space-goes-to-end t
|
|
|
|
eshell-where-to-jump 'begin)
|
2021-09-05 04:57:04 +00:00
|
|
|
(:local-set outline-regexp eshell-prompt-regexp
|
|
|
|
page-delimiter eshell-prompt-regexp)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind "C-d" '+eshell-quit-or-delete-char)
|
|
|
|
(:when-loaded
|
|
|
|
(setenv "PAGER" "cat")))
|
|
|
|
|
|
|
|
(setup magit
|
|
|
|
;; This setup is weird because of dependency issues
|
|
|
|
(:straight (transient :host github :repo "magit/transient" :branch "master")
|
|
|
|
(magit :host github :repo "magit/magit")
|
|
|
|
(git-modes :host github :repo "magit/git-modes"))
|
|
|
|
(when (eq system-type 'gnu/linux)
|
|
|
|
(:straight (forge :host github :repo "magit/forge"))
|
|
|
|
(with-eval-after-load 'magit
|
|
|
|
(require 'forge)
|
|
|
|
(add-to-list 'forge-alist
|
|
|
|
'("tildegit.org" "tildegit.org/api/v1" "tildegit.org"
|
|
|
|
forge-gitea-repository)))))
|
|
|
|
|
2021-12-05 05:09:33 +00:00
|
|
|
(setup prog
|
|
|
|
(:local-set comment-auto-fill-only-comments t)
|
|
|
|
(:hook 'prettify-symbols-mode
|
|
|
|
'display-fill-column-indicator-mode
|
|
|
|
'turn-on-auto-fill))
|
|
|
|
|
|
|
|
(setup text
|
|
|
|
(:hook 'turn-on-auto-fill))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight 0x0)
|
|
|
|
(:option 0x0-default-server 'ttm)
|
|
|
|
(with-eval-after-load 'embark
|
|
|
|
(define-key embark-region-map (kbd "U") '0x0-dwim)))
|
|
|
|
|
|
|
|
(setup (:straight acme-theme)
|
|
|
|
;; (load-theme 'acme t)
|
2021-09-16 04:32:16 +00:00
|
|
|
)
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight anzu)
|
2021-12-05 05:09:33 +00:00
|
|
|
(:option anzu-cons-mode-line-p nil)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key [remap query-replace] 'anzu-query-replace-regexp
|
2021-11-22 05:57:41 +00:00
|
|
|
[remap query-replace-regexp] 'anzu-query-replace-regexp)
|
|
|
|
(global-anzu-mode +1)
|
|
|
|
(:bind-into isearch
|
|
|
|
[remap isearch-query-replace]
|
|
|
|
'anzu-isearch-query-replace
|
|
|
|
[remap isearch-query-replace-regexp]
|
|
|
|
'anzu-isearch-query-replace-regexp))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
|
|
|
(setup (:straight avy)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:also-load +avy)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-j" 'avy-goto-char-timer)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind-into isearch
|
|
|
|
"M-j" 'avy-isearch)
|
|
|
|
(:when-loaded
|
|
|
|
(setf (alist-get ?. avy-dispatch-alist) 'avy-action-embark)))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-11-23 05:07:32 +00:00
|
|
|
(setup (:straight (cape :host github :repo "minad/cape"))
|
|
|
|
(dolist (fn '(;; All available cape capfs listed here.
|
|
|
|
cape-file-capf
|
|
|
|
cape-dabbrev-capf
|
|
|
|
cape-keyword-capf
|
|
|
|
;;cape-abbrev-capf
|
|
|
|
;;cape-ispell-capf
|
|
|
|
;;cape-dict-capf
|
|
|
|
))
|
|
|
|
(add-to-list 'completion-at-point-functions fn)))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight (capf-autosuggest
|
|
|
|
:repo "https://repo.or.cz/emacs-capf-autosuggest.git"))
|
|
|
|
(:hook-into eshell-mode
|
|
|
|
comint-mode))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-12-02 06:18:04 +00:00
|
|
|
(setup (:straight circadian)
|
|
|
|
(:option circadian-themes '((:sunrise . modus-operandi)
|
|
|
|
(:sunset . modus-vivendi)))
|
|
|
|
(circadian-setup))
|
|
|
|
|
2021-09-25 19:03:00 +00:00
|
|
|
(setup (:straight circe)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:require _circe)
|
|
|
|
(:require +circe)
|
|
|
|
(autoload '+irc "+circe" "Connect to IRC." t)
|
2021-10-22 00:00:43 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Formatting options
|
|
|
|
(:option circe-format-action (format (format "%%%ds* {nick} {body}"
|
|
|
|
(- +circe-left-margin 2))
|
|
|
|
" ")
|
|
|
|
circe-format-say (format "{nick:%1$d.%1$ds} | {body}"
|
|
|
|
(- +circe-left-margin 3))
|
2021-09-25 19:03:00 +00:00
|
|
|
circe-format-self-action circe-format-action
|
2021-11-22 05:57:41 +00:00
|
|
|
circe-format-self-say (replace-regexp-in-string "|" ">"
|
|
|
|
circe-format-say)
|
|
|
|
circe-format-server-part (+circe-format-meta
|
2021-10-22 00:00:43 +00:00
|
|
|
"PART {channel}: {reason}")
|
2021-11-22 05:57:41 +00:00
|
|
|
circe-format-server-quit (+circe-format-meta "QUIT: {reason}")
|
|
|
|
circe-format-server-quit-channel (+circe-format-meta
|
2021-10-22 00:00:43 +00:00
|
|
|
"QUIT {channel}: {reason}")
|
2021-11-22 05:57:41 +00:00
|
|
|
circe-format-server-join (+circe-format-meta "JOIN: {userinfo}")
|
|
|
|
circe-format-server-rejoin (+circe-format-meta
|
|
|
|
(concat "REJOIN: {userinfo} "
|
|
|
|
"after {departuredelta}"))
|
|
|
|
circe-format-server-topic (+circe-format-meta
|
2021-10-22 00:00:43 +00:00
|
|
|
"TOPIC: {new-topic}")
|
2021-10-11 23:02:27 +00:00
|
|
|
circe-prompt-string (format (format "%%%ds> "
|
2021-11-22 05:57:41 +00:00
|
|
|
(- +circe-left-margin 2))
|
|
|
|
" "))
|
|
|
|
|
2021-11-23 05:08:46 +00:00
|
|
|
(:option +circe-server-buffer-action (lambda (buf)
|
|
|
|
(message "Connected to %s" buf))
|
|
|
|
+circe-network-inhibit-autoconnect _circe-network-inhibit-autoconnect
|
2021-11-22 05:57:41 +00:00
|
|
|
circe-network-options _circe-network-options
|
|
|
|
circe-color-nicks-everywhere t
|
|
|
|
circe-default-part-message "See You, Space Cowpokes . . ."
|
|
|
|
circe-default-user user-real-login-name
|
2021-09-25 19:03:00 +00:00
|
|
|
circe-reduce-lurker-spam t
|
2021-11-22 05:57:41 +00:00
|
|
|
circe-server-auto-join-default-type :after-auth)
|
|
|
|
(:bind "C-c C-p" 'circe-command-PART
|
|
|
|
"C-c C-t" '+circe-current-topic
|
|
|
|
"C-l" 'lui-track-jump-to-indicator
|
|
|
|
"C-<return>" '+circe-chat@set-prompt)
|
2021-10-08 22:21:54 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(advice-add 'circe-command-PART :after '+circe-kill-buffer)
|
|
|
|
(advice-add 'circe-command-QUIT :after '+circe-quit@kill-buffer)
|
|
|
|
(advice-add 'circe-command-GQUIT :after '+circe-gquit@kill-buffer)
|
2021-09-25 19:03:00 +00:00
|
|
|
|
|
|
|
(:with-mode circe-chat-mode
|
2021-11-22 05:57:41 +00:00
|
|
|
(:hook 'enable-circe-color-nicks
|
|
|
|
'enable-circe-new-day-notifier
|
|
|
|
'+circe-chat@set-prompt)
|
|
|
|
(:bind "C-c C-s" 'circe-command-SLAP))
|
2021-09-25 19:03:00 +00:00
|
|
|
|
|
|
|
(:with-mode lui-mode
|
2021-11-22 05:57:41 +00:00
|
|
|
(:option lui-fill-column (+ fill-column +circe-left-margin)
|
|
|
|
lui-fill-type nil
|
2021-09-25 19:03:00 +00:00
|
|
|
lui-time-stamp-position 'right-margin
|
2021-11-22 05:57:41 +00:00
|
|
|
lui-time-stamp-format "[ %H:%M"
|
2021-09-25 19:03:00 +00:00
|
|
|
lui-track-behavior 'before-switch-to-buffer
|
|
|
|
lui-track-indicator 'fringe
|
|
|
|
lui-fill-remove-face-from-newline nil)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:hook 'visual-line-mode
|
|
|
|
'enable-lui-track
|
|
|
|
'visual-fill-column-mode)
|
|
|
|
(:local-set fringes-outside-margins t
|
|
|
|
right-margin-width (length lui-time-stamp-format)
|
2021-09-25 19:03:00 +00:00
|
|
|
scroll-margin 0
|
|
|
|
word-wrap t
|
2021-11-22 05:57:41 +00:00
|
|
|
wrap-prefix (+string-repeat +circe-left-margin " ")
|
2021-09-27 23:19:47 +00:00
|
|
|
line-number-mode nil
|
2021-09-29 22:21:01 +00:00
|
|
|
column-number-mode nil
|
2021-11-22 05:57:41 +00:00
|
|
|
file-percentage-mode nil
|
|
|
|
visual-fill-column-extra-text-width
|
|
|
|
(cons +circe-left-margin 0)))
|
2021-10-15 01:34:46 +00:00
|
|
|
|
|
|
|
(add-hook 'kill-emacs-hook
|
|
|
|
(defun circe-quit-all ()
|
|
|
|
(ignore-errors
|
2021-11-22 05:57:41 +00:00
|
|
|
(advice-remove 'circe-command-GQUIT
|
|
|
|
'circe-gquit@kill-buffer)
|
2021-10-15 01:34:46 +00:00
|
|
|
(circe-command-GQUIT "Quitting Emacs, bye!")))))
|
2021-09-25 19:03:00 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight consult)
|
|
|
|
(:also-load +consult)
|
|
|
|
;; from Consult wiki
|
2021-09-16 04:32:16 +00:00
|
|
|
(:option register-preview-delay 0
|
2021-11-22 05:57:41 +00:00
|
|
|
register-preview-function 'consult-register-format
|
|
|
|
xref-show-xrefs-function 'consult-xref
|
|
|
|
xref-show-definitions-function 'consult-xref
|
|
|
|
tab-always-indent 'complete
|
|
|
|
completion-in-region-function 'consult-completion-in-region)
|
|
|
|
(advice-add 'register-preview :override 'consult-register-window)
|
|
|
|
(advice-add 'completing-read-multiple :override
|
|
|
|
'consult-completing-read-multiple)
|
|
|
|
(dolist (binding '(;; C-c bindings (mode-specific-map)
|
|
|
|
("C-c h" . consult-history)
|
|
|
|
("C-c m" . consult-mode-command)
|
|
|
|
("C-c b" . consult-bookmark)
|
|
|
|
("C-c k" . consult-kmacro)
|
|
|
|
;; C-x bindings (ctl-x-map)
|
|
|
|
("C-x M-:" . consult-complex-command)
|
|
|
|
("C-x b" . consult-buffer)
|
|
|
|
("C-x 4 b" . consult-buffer-other-window)
|
|
|
|
("C-x 5 b" . consult-buffer-other-frame)
|
|
|
|
;; Custom M-# bindings for fast register access
|
|
|
|
("M-#" . consult-register-load)
|
|
|
|
("M-'" . consult-register-store)
|
|
|
|
("C-M-#" . consult-register)
|
|
|
|
;; Other custom bindings
|
|
|
|
("M-y" . consult-yank-pop)
|
|
|
|
("<help> a" . consult-apropos)
|
|
|
|
;; M-g bindings (goto-map)
|
|
|
|
("M-g e" . consult-compile-error)
|
|
|
|
("M-g f" . consult-flymake) ; or consult-flycheck
|
|
|
|
("M-g g" . consult-goto-line)
|
|
|
|
("M-g M-g" . consult-goto-line)
|
|
|
|
("M-g o" . consult-outline) ; or consult-org-heading
|
|
|
|
("M-g m" . consult-mark)
|
|
|
|
("M-g k" . consult-global-mark)
|
|
|
|
("M-g i" . consult-imenu)
|
|
|
|
("M-g I" . consult-imenu-multi)
|
|
|
|
;; M-s bindings (search-map)
|
|
|
|
("M-s f" . consult-find)
|
|
|
|
("M-s F" . consult-locate)
|
|
|
|
("M-s g" . consult-grep)
|
|
|
|
("M-s G" . consult-git-grep)
|
|
|
|
("M-s r" . consult-ripgrep)
|
|
|
|
("M-s l" . consult-line)
|
|
|
|
("M-s L" . consult-line-multi)
|
|
|
|
("M-s m" . consult-multi-occur)
|
|
|
|
("M-s k" . consult-keep-lines)
|
|
|
|
("M-s u" . consult-focus-lines)
|
|
|
|
;; Isearch integration
|
|
|
|
("M-s e" . consult-isearch-history)))
|
|
|
|
(global-set-key (kbd (car binding)) (cdr binding)))
|
|
|
|
(with-eval-after-load 'isearch-mode
|
|
|
|
(dolist (binding '(("M-e" . consult-isearch-history)
|
|
|
|
("M-s e" . consult-isearch-history)
|
|
|
|
("M-s l" . consult-line)
|
|
|
|
("M-s L" . consult-line-multi)))
|
|
|
|
(define-key isearch-mode-map (car binding) (cdr binding))))
|
|
|
|
(with-eval-after-load 'org-mode
|
|
|
|
(define-key org-mode-map "M-g o" 'consult-org-heading))
|
|
|
|
(with-eval-after-load 'consult
|
|
|
|
(:option consult-narrow-key "<"
|
|
|
|
consult-project-root-function '+consult-project-root)
|
|
|
|
(consult-customize
|
|
|
|
consult-theme
|
|
|
|
:preview-key '(:debounce 0.2 any)
|
|
|
|
consult-ripgrep consult-git-grep consult-grep
|
|
|
|
consult-bookmark consult-recent-file consult-xref
|
|
|
|
consult--source-file consult--source-project-file
|
|
|
|
consult--source-bookmark
|
|
|
|
:preview-key (kbd "M-."))
|
|
|
|
(consult-history-to-modes ((minibuffer-local-map . nil)
|
|
|
|
(shell-mode-map . shell-mode-hook)
|
|
|
|
(term-mode-map . term-mode-hook)
|
|
|
|
(term-raw-map . term-mode-hook)
|
|
|
|
(comint-mode-map . comint-mode-hook)
|
|
|
|
(sly-mrepl-mode-map . sly-mrepl-hook)))
|
|
|
|
(with-eval-after-load 'orderless
|
|
|
|
(:option consult--regexp-compiler 'consult--orderless-regexp-compiler))))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-12-06 04:37:41 +00:00
|
|
|
(setup (:straight crux)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-o" 'crux-smart-open-line
|
2021-12-06 04:37:41 +00:00
|
|
|
"M-o" 'crux-other-window-or-switch-buffer
|
|
|
|
"C-x 4 t" 'crux-transpose-windows)
|
|
|
|
|
|
|
|
(el-patch-feature crux)
|
|
|
|
(with-eval-after-load 'crux
|
|
|
|
(el-patch-defun crux-reopen-as-root ()
|
|
|
|
"Find file as root if necessary.
|
|
|
|
|
|
|
|
Meant to be used as `find-file-hook'.
|
|
|
|
See also `crux-reopen-as-root-mode'."
|
|
|
|
(unless (or
|
|
|
|
;; This helps fix for `nov-mode', and possibly others.
|
|
|
|
(el-patch-add (null buffer-file-name))
|
|
|
|
(tramp-tramp-file-p buffer-file-name)
|
|
|
|
(equal major-mode 'dired-mode)
|
|
|
|
(not (file-exists-p (file-name-directory buffer-file-name)))
|
|
|
|
(file-writable-p buffer-file-name)
|
|
|
|
(crux-file-owned-by-user-p buffer-file-name))
|
|
|
|
(crux-find-alternate-file-as-root buffer-file-name))))
|
|
|
|
(crux-reopen-as-root-mode +1))
|
|
|
|
|
2021-09-25 19:03:00 +00:00
|
|
|
(setup (:straight dictionary)
|
|
|
|
(:option dictionary-use-single-buffer t)
|
|
|
|
(autoload 'dictionary-search "dictionary"
|
|
|
|
"Ask for a word and search it in all dictionaries" t)
|
|
|
|
(autoload 'dictionary-match-words "dictionary"
|
|
|
|
"Ask for a word and search all matching words in the dictionaries" t)
|
|
|
|
(autoload 'dictionary-lookup-definition "dictionary"
|
|
|
|
"Unconditionally lookup the word at point." t)
|
|
|
|
(autoload 'dictionary "dictionary"
|
|
|
|
"Create a new dictionary buffer" t)
|
|
|
|
(autoload 'dictionary-mouse-popup-matching-words "dictionary"
|
|
|
|
"Display entries matching the word at the cursor" t)
|
|
|
|
(autoload 'dictionary-popup-matching-words "dictionary"
|
|
|
|
"Display entries matching the word at the point" t)
|
|
|
|
(autoload 'dictionary-tooltip-mode "dictionary"
|
|
|
|
"Display tooltips for the current word" t)
|
|
|
|
(autoload 'global-dictionary-tooltip-mode "dictionary"
|
2021-11-22 05:57:41 +00:00
|
|
|
"Enable/disable dictionary-tooltip-mode for all buffers" t))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight electric-cursor)
|
2021-09-16 04:32:16 +00:00
|
|
|
(electric-cursor-mode +1))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight electric-cursor)
|
|
|
|
(electric-cursor-mode +1))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight embark)
|
|
|
|
(:option prefix-help-command 'embark-prefix-help-command)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-." 'embark-act
|
2021-11-22 05:57:41 +00:00
|
|
|
"M-." 'embark-dwim
|
2021-12-05 05:09:33 +00:00
|
|
|
"<help> B" 'embark-bindings))
|
2021-09-16 04:32:16 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight embark-consult)
|
|
|
|
(:load-after consult embark)
|
|
|
|
(add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode))
|
2021-09-09 21:36:47 +00:00
|
|
|
|
2021-12-06 04:37:41 +00:00
|
|
|
(setup (:straight eros)
|
|
|
|
(:hook-into emacs-lisp-mode
|
|
|
|
lisp-interaction-mode))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight eshell-syntax-highlighting)
|
|
|
|
(:hook-into eshell-mode))
|
2021-04-29 17:16:03 +00:00
|
|
|
|
2021-10-05 19:22:18 +00:00
|
|
|
(setup (:straight-when exec-path-from-shell
|
2021-11-22 05:57:41 +00:00
|
|
|
(eq system-type 'gnu/linux))
|
2021-09-04 15:38:06 +00:00
|
|
|
(when (daemonp)
|
2021-10-12 03:42:59 +00:00
|
|
|
(exec-path-from-shell-initialize))
|
|
|
|
(exec-path-from-shell-copy-envs '("XDG_CONFIG_HOME"
|
|
|
|
"XDG_CONFIG_DIRS"
|
|
|
|
"XDG_DATA_HOME"
|
|
|
|
"XDG_DATA_DIRS"
|
|
|
|
"XDG_CACHE_HOME")))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
|
|
|
(setup (:straight expand-region)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-=" 'er/expand-region))
|
2021-09-14 21:56:56 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight (filldent
|
|
|
|
:host github
|
|
|
|
:repo "duckwork/filldent.el"))
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-q" 'filldent-dwim))
|
2021-09-09 04:18:30 +00:00
|
|
|
|
2021-10-13 22:58:04 +00:00
|
|
|
(setup (:straight (frowny
|
|
|
|
:host github
|
|
|
|
:repo "duckwork/frowny.el"))
|
|
|
|
(global-frowny-mode +1))
|
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight gcmh)
|
|
|
|
(:option gcmh-idle-delay 'auto)
|
|
|
|
(gcmh-mode +1))
|
|
|
|
|
|
|
|
(setup (:straight helpful)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "<help> f" 'helpful-callable
|
2021-11-22 05:57:41 +00:00
|
|
|
"<help> v" 'helpful-variable
|
|
|
|
"<help> k" 'helpful-key
|
|
|
|
"C-c C-d" 'helpful-at-point))
|
|
|
|
|
2021-10-14 22:26:33 +00:00
|
|
|
(setup (:straight (hippie-completing-read
|
|
|
|
:host github
|
|
|
|
:repo "duckwork/hippie-completing-read"))
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-/" 'hippie-completing-read))
|
2021-10-14 22:26:33 +00:00
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight hungry-delete)
|
|
|
|
(:option hungry-delete-chars-to-skip " \t"
|
2021-11-22 05:57:41 +00:00
|
|
|
hungry-delete-join-reluctantly nil)
|
|
|
|
(:bind-into paredit
|
|
|
|
[remap paredit-backward-delete]
|
|
|
|
(defun acdw/paredit-hungry-delete-backward (arg)
|
|
|
|
(interactive "P")
|
|
|
|
(if (looking-back "[ \t]" 1)
|
|
|
|
(hungry-delete-backward (or arg 1))
|
|
|
|
(paredit-backward-delete arg)))
|
|
|
|
[remap paredit-forward-delete]
|
|
|
|
(defun acdw/paredit-hungry-delete-forward (arg)
|
|
|
|
(interactive "P")
|
|
|
|
(if (looking-at "[ \t]")
|
|
|
|
(hungry-delete-forward (or arg 1))
|
|
|
|
(paredit-forward-delete arg))))
|
|
|
|
(global-hungry-delete-mode +1))
|
|
|
|
|
|
|
|
(setup (:straight isearch-mb)
|
|
|
|
;; This complicatedness is an attempt to make it easier to add and
|
|
|
|
;; subtract `isearch-mb' bindings using the suggestions in the
|
|
|
|
;; project's README.
|
|
|
|
(with-eval-after-load 'isearch-mb
|
|
|
|
(dolist (spec '((isearch-mb--with-buffer
|
|
|
|
("M-e" . consult-isearch)
|
|
|
|
("C-o" . loccur-isearch))
|
|
|
|
(isearch-mb--after-exit
|
|
|
|
("M-%" . anzu-isearch-query-replace)
|
|
|
|
("M-s l" . consult-line))))
|
|
|
|
(let ((isearch-mb-list (car spec))
|
|
|
|
(isearch-mb-binds (cdr spec)))
|
|
|
|
(dolist (cell isearch-mb-binds)
|
|
|
|
(let ((key (car cell))
|
|
|
|
(command (cdr cell)))
|
|
|
|
(when (fboundp command)
|
|
|
|
(add-to-list isearch-mb-list command)
|
|
|
|
(define-key isearch-mb-minibuffer-map (kbd key) command)))))))
|
|
|
|
(isearch-mb-mode +1))
|
2021-10-02 00:06:13 +00:00
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight lacarte)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "<f10>" 'lacarte-execute-menu-command))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
|
|
|
(setup (:straight marginalia)
|
|
|
|
(marginalia-mode +1))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight minions)
|
|
|
|
(:option minions-prominent-modes
|
|
|
|
'(tracking-mode))
|
|
|
|
(minions-mode +1))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
2021-10-21 23:59:54 +00:00
|
|
|
(setup (:straight mode-line-bell)
|
|
|
|
(:option mode-line-bell-flash-time 0.1)
|
|
|
|
(mode-line-bell-mode +1))
|
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight (modus-themes
|
|
|
|
:host gitlab
|
2021-12-02 06:18:04 +00:00
|
|
|
:repo "protesilaos/modus-themes")))
|
2021-03-29 22:52:23 +00:00
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight mwim)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-a" #'mwim-beginning
|
2021-09-04 15:38:06 +00:00
|
|
|
"C-e" #'mwim-end))
|
2021-03-29 22:52:23 +00:00
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight orderless)
|
|
|
|
(:option completion-styles '(orderless)))
|
2021-04-10 22:31:40 +00:00
|
|
|
|
2021-09-30 23:22:58 +00:00
|
|
|
(setup (:straight (org
|
|
|
|
:type git
|
|
|
|
:repo "https://git.savannah.gnu.org/git/emacs/org-mode.git"
|
|
|
|
:local-repo "org"
|
|
|
|
:depth full
|
|
|
|
:pre-build (straight-recipes-org-elpa--build)
|
|
|
|
:build (:not autoloads)
|
|
|
|
:files (:defaults
|
|
|
|
"lisp/*.el"
|
|
|
|
("etc/styles/" "etc/styles/*")))
|
|
|
|
(org-contrib
|
|
|
|
:type git
|
|
|
|
:repo "https://git.sr.ht/~bzg/org-contrib"))
|
2021-11-22 05:57:41 +00:00
|
|
|
;; DO NOT load system-installed org !!!
|
|
|
|
(setq load-path (cl-remove-if (lambda (path)
|
|
|
|
(string-match-p "lisp/org\\'" path))
|
|
|
|
load-path))
|
|
|
|
(:also-load +org
|
|
|
|
ox-md)
|
2021-09-27 23:21:03 +00:00
|
|
|
(:option org-adapt-indentation nil
|
|
|
|
org-catch-invisible-edits 'show-and-error
|
2021-10-05 13:34:24 +00:00
|
|
|
org-clock-clocked-in-display 'mode-line
|
2021-10-14 22:26:51 +00:00
|
|
|
org-clock-frame-title-format (cons
|
|
|
|
'(t org-mode-line-string)
|
|
|
|
(cons " --- " frame-title-format))
|
2021-10-11 23:03:29 +00:00
|
|
|
org-clock-string-limit 7 ; just the clock bit
|
|
|
|
;; org-clock-string-limit 25 ; gives enough information
|
2021-09-27 23:21:03 +00:00
|
|
|
org-clock-persist t
|
|
|
|
org-confirm-babel-evaluate nil
|
|
|
|
org-cycle-separator-lines 0
|
|
|
|
org-directory "~/org"
|
2021-11-22 05:57:41 +00:00
|
|
|
org-ellipsis "…"
|
2021-09-27 23:21:03 +00:00
|
|
|
org-export-coding-system 'utf-8-unix
|
|
|
|
org-export-headline-levels 8
|
|
|
|
org-export-with-section-numbers nil
|
|
|
|
org-export-with-smart-quotes t
|
|
|
|
org-export-with-sub-superscripts t
|
|
|
|
org-export-with-toc nil
|
|
|
|
org-fontify-done-headline t
|
|
|
|
org-fontify-quote-and-verse-blocks t
|
|
|
|
org-fontify-whole-heading-line t
|
|
|
|
org-hide-emphasis-markers t
|
|
|
|
org-html-coding-system 'utf-8-unix
|
2021-11-22 05:57:41 +00:00
|
|
|
org-image-actual-width (list (* (window-font-width)
|
|
|
|
(- fill-column 8)))
|
2021-09-27 23:21:03 +00:00
|
|
|
org-imenu-depth 3
|
|
|
|
org-list-demote-modify-bullet '(("-" . "+")
|
|
|
|
("+" . "*")
|
|
|
|
("*" . "-"))
|
2021-10-22 00:00:18 +00:00
|
|
|
org-log-done 'time
|
2021-09-27 23:21:03 +00:00
|
|
|
org-log-into-drawer t
|
|
|
|
org-outline-path-complete-in-steps nil
|
|
|
|
org-pretty-entities t
|
|
|
|
org-refile-use-outline-path 'file
|
|
|
|
org-special-ctrl-a/e t
|
|
|
|
org-special-ctrl-k t
|
|
|
|
org-src-fontify-natively t
|
|
|
|
org-src-tab-acts-natively t
|
|
|
|
org-src-window-setup 'current-window
|
|
|
|
org-startup-truncated nil
|
|
|
|
org-startup-with-inline-images t
|
2021-10-07 21:02:09 +00:00
|
|
|
org-tags-column (- (- fill-column (length org-ellipsis))))
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind "RET" '+org-return-dwim
|
|
|
|
"<S-return>" '+org-table-copy-down
|
|
|
|
"C-c C-l" '+org-insert-link-dwim
|
|
|
|
"C-c C-n" '+org-next-heading-widen
|
|
|
|
"C-c C-p" '+org-previous-heading-widen)
|
|
|
|
(:local-set unfill-fill-function 'org-fill-paragraph)
|
|
|
|
(:local-hook before-save-hook '+org-before-save@prettify-buffer)
|
|
|
|
(advice-add 'org-delete-backward-char :override '+org-delete-backward-char)
|
2021-09-27 23:21:03 +00:00
|
|
|
(with-eval-after-load 'org
|
2021-11-22 05:57:41 +00:00
|
|
|
(org-clock-persistence-insinuate)))
|
2021-09-02 02:15:57 +00:00
|
|
|
|
|
|
|
(setup (:straight org-appear)
|
2021-09-23 22:11:30 +00:00
|
|
|
(:option org-appear-autoemphasis t
|
|
|
|
org-appear-autoentities t
|
|
|
|
org-appear-autokeywords t
|
|
|
|
org-appear-autolinks nil
|
|
|
|
org-appear-autosubmarkers t
|
|
|
|
org-appear-delay 0)
|
2021-09-02 02:15:57 +00:00
|
|
|
(:hook-into org-mode))
|
|
|
|
|
2021-12-07 01:58:46 +00:00
|
|
|
(setup (:straight org-sticky-header)
|
|
|
|
(:hook-into org-mode))
|
|
|
|
|
2021-10-09 21:21:24 +00:00
|
|
|
(setup (:straight paredit)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind "DEL" 'paredit-backward-delete
|
|
|
|
"C-<backspace>" 'paredit-backward-kill-word)
|
2021-10-09 21:21:24 +00:00
|
|
|
(:hook-into emacs-lisp-mode lisp-interaction-mode
|
|
|
|
lisp-mode scheme-mode)
|
|
|
|
(:also-load eldoc)
|
|
|
|
(eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
|
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight paren-face)
|
2021-09-25 18:15:42 +00:00
|
|
|
(:hook-into emacs-lisp-mode
|
|
|
|
ielm-mode sly-repl-mode
|
|
|
|
lisp-mode
|
|
|
|
lisp-interaction-mode
|
|
|
|
scheme-mode))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
2021-12-07 01:58:46 +00:00
|
|
|
(setup (:straight scratch)
|
|
|
|
(:require +scratch)
|
|
|
|
(:option initial-major-mode 'emacs-lisp-mode
|
|
|
|
initial-scratch-message
|
|
|
|
";; ABANDON ALL HOPE YE WHO ENTER HERE\n")
|
|
|
|
(add-hook 'kill-buffer-query-functions '+scratch-immortal)
|
|
|
|
(add-hook 'scratch-create-buffer-hook '+scratch-buffer-setup))
|
|
|
|
|
2021-09-28 04:07:50 +00:00
|
|
|
(setup (:straight (shell-command+
|
|
|
|
:host nil
|
|
|
|
:repo "https://git.sr.ht/~pkal/shell-command-plus"))
|
2021-09-04 15:38:06 +00:00
|
|
|
(:option shell-command-prompt "$ ")
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind-into dired
|
|
|
|
"M-!" 'shell-command+)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-!" 'shell-command+))
|
2021-10-02 05:04:16 +00:00
|
|
|
|
2021-12-05 05:09:33 +00:00
|
|
|
(setup (:straight (simple-modeline
|
|
|
|
:fork (:repo "duckwork/simple-modeline")))
|
|
|
|
(:also-load +modeline)
|
|
|
|
(:option simple-modeline-segments '((;; left
|
|
|
|
+modeline-modified
|
|
|
|
+modeline-buffer-name
|
|
|
|
+modeline-position
|
|
|
|
+modeline-anzu
|
|
|
|
)
|
|
|
|
(;; right
|
|
|
|
+modeline-track
|
|
|
|
+modeline-vc
|
|
|
|
simple-modeline-segment-misc-info
|
|
|
|
simple-modeline-segment-process
|
|
|
|
+modeline-narrowed
|
|
|
|
+modeline-minions
|
|
|
|
+modeline-major-mode)))
|
|
|
|
(simple-modeline-mode +1))
|
|
|
|
|
2021-12-07 01:58:46 +00:00
|
|
|
(setup (:straight smartscan)
|
|
|
|
(smartscan-mode +1))
|
|
|
|
|
2021-11-22 05:57:41 +00:00
|
|
|
(setup (:straight (sophomore
|
2021-10-07 22:28:51 +00:00
|
|
|
:host github
|
2021-11-22 05:57:41 +00:00
|
|
|
:repo "duckwork/sophomore.el"))
|
|
|
|
(:option disabled-command-function 'sophomore-dispatch
|
|
|
|
sophomore-dispatch-alist '((fatfinger . sophomore-fat-finger)))
|
|
|
|
(put 'save-buffers-kill-terminal 'disabled 'fatfinger))
|
2021-10-07 22:28:51 +00:00
|
|
|
|
2021-06-03 04:38:30 +00:00
|
|
|
(setup (:straight ssh-config-mode)
|
2021-09-04 15:38:06 +00:00
|
|
|
(:file-match (rx "/.ssh/config" eos)
|
|
|
|
(rx "/ssh" (? "d") "_config" eos))
|
|
|
|
(:with-mode ssh-known-hosts-mode
|
|
|
|
(:file-match (rx "/knownhosts" eos)))
|
|
|
|
(:with-mode ssh-authorized-keys-mode
|
2021-11-22 05:57:41 +00:00
|
|
|
(:file-match (rx "/authorized_keys" (? "2") eos))))
|
2021-06-03 04:38:30 +00:00
|
|
|
|
2021-09-27 23:21:23 +00:00
|
|
|
(setup (:straight super-save)
|
|
|
|
(:option auto-save-default nil
|
2021-10-11 23:03:50 +00:00
|
|
|
super-save-auto-save-when-idle t
|
|
|
|
super-save-idle-duration 60
|
2021-09-27 23:21:23 +00:00
|
|
|
super-save-exclude '(".gpg")
|
|
|
|
super-save-remote-files nil)
|
|
|
|
(auto-save-visited-mode -1)
|
|
|
|
(super-save-mode +1))
|
|
|
|
|
2021-12-07 01:58:46 +00:00
|
|
|
(setup (:straight topsy)
|
|
|
|
(:hook-into prog-mode
|
|
|
|
circe-chat-mode)
|
|
|
|
(:when-loaded
|
|
|
|
(:option
|
|
|
|
topsy-header-line-format
|
|
|
|
'(:eval
|
|
|
|
(list
|
|
|
|
(propertize " "
|
|
|
|
'display
|
|
|
|
`((space
|
|
|
|
:align-to
|
|
|
|
,(unless (bound-and-true-p visual-fill-column-mode)
|
|
|
|
0))))
|
|
|
|
(funcall topsy-fn))))))
|
|
|
|
|
2021-09-06 17:52:51 +00:00
|
|
|
(setup (:straight trashed)
|
|
|
|
(:option trashed-action-confirmer #'y-or-n-p))
|
|
|
|
|
2021-04-29 17:16:03 +00:00
|
|
|
(setup (:straight undo-fu)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "C-/" #'undo-fu-only-undo
|
2021-09-04 02:49:48 +00:00
|
|
|
"C-?" #'undo-fu-only-redo))
|
2021-04-03 14:48:05 +00:00
|
|
|
|
2021-04-29 17:16:03 +00:00
|
|
|
(setup (:straight undo-fu-session)
|
|
|
|
(:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
|
|
|
|
"/git-rebase-todo\\'")
|
2021-11-22 05:57:41 +00:00
|
|
|
undo-fu-session-directory (.etc "undo/" t)
|
|
|
|
undo-fu-session-compression (eq system-type 'gnu/linux))
|
2021-04-29 17:16:03 +00:00
|
|
|
(global-undo-fu-session-mode +1))
|
2021-03-29 22:52:23 +00:00
|
|
|
|
2021-10-05 13:34:24 +00:00
|
|
|
(setup (:straight (unfill :host github :repo "purcell/unfill"
|
|
|
|
:fork (:host github :repo "duckwork/unfill")))
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-q" #'unfill-toggle))
|
2021-08-14 17:39:31 +00:00
|
|
|
|
2021-09-04 15:38:06 +00:00
|
|
|
(setup (:straight (vertico
|
|
|
|
:host github
|
|
|
|
:repo "minad/vertico"
|
|
|
|
:files ("*" "extensions/*"
|
|
|
|
(:exclude ".git"))))
|
|
|
|
(:option resize-mini-windows 'grow-only
|
|
|
|
vertico-count-format nil
|
|
|
|
vertico-cycle t)
|
|
|
|
(when (boundp 'native-comp-deferred-compilation-deny-list)
|
|
|
|
(add-to-list 'native-comp-deferred-compilation-deny-list "vertico"))
|
|
|
|
(vertico-mode +1)
|
2021-11-22 05:57:41 +00:00
|
|
|
;; Extensions
|
|
|
|
(:also-load vertico-directory)
|
2021-09-23 22:11:30 +00:00
|
|
|
(:with-map vertico-map
|
2021-11-22 05:57:41 +00:00
|
|
|
(:bind "RET" 'vertico-directory-enter
|
|
|
|
"DEL" 'vertico-directory-delete-char
|
|
|
|
"M-DEL" 'vertico-directory-delete-word))
|
|
|
|
(add-hook 'rfn-eshadow-update-overlay-hook 'vertico-directory-tidy))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
2021-10-02 00:06:13 +00:00
|
|
|
(setup (:straight visual-fill-column)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:option visual-fill-column-center-text t)
|
2021-12-02 06:18:04 +00:00
|
|
|
(:hook 'visual-line-mode)
|
2021-10-02 00:06:13 +00:00
|
|
|
(:hook-into org-mode)
|
2021-11-22 05:57:41 +00:00
|
|
|
(with-eval-after-load 'visual-fill-column
|
|
|
|
(advice-add 'text-scale-adjust :after 'visual-fill-column-adjust)))
|
2021-09-04 15:38:06 +00:00
|
|
|
|
|
|
|
(setup (:straight whitespace-cleanup-mode)
|
2021-11-22 05:57:41 +00:00
|
|
|
(:option whitespace-cleanup-mode-preserve-point t)
|
2021-12-06 04:37:41 +00:00
|
|
|
;;(remove-hook 'before-save-hook 'whitespace-cleanup)
|
2021-09-04 15:38:06 +00:00
|
|
|
(global-whitespace-cleanup-mode +1))
|
2021-12-05 05:09:33 +00:00
|
|
|
|
|
|
|
(setup (:straight zzz-to-char)
|
2021-12-07 01:58:46 +00:00
|
|
|
(:+key "M-z" (lambda (prefix)
|
2021-12-05 05:09:33 +00:00
|
|
|
"Call `zzz-to-char' or `zzz-up-to-char' with PREFIX arg."
|
|
|
|
(interactive "P")
|
|
|
|
(call-interactively
|
|
|
|
(if prefix #'zzz-up-to-char #'zzz-to-char)))))
|