From 2243b1e4effdeda0cec9cde4a49fd9ac8a5f9271 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 16 Jan 2022 23:13:11 -0600 Subject: Dammit, lots of changes --- init.el | 90 ++++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 26 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 4136271..9f4d2fe 100644 --- a/init.el +++ b/init.el @@ -295,23 +295,25 @@ eshell-scroll-to-bottom-on-input 'all eshell-smart-space-goes-to-end t eshell-where-to-jump 'begin) - (add-hook 'eshell-mode-hook - (defun +eshell@setup () - "Eshell improperly does loading. Gah." - (interactive) - (dolist (setting `((outline-regexp . ,eshell-prompt-regexp) - (page-delimiter . ,eshell-prompt-regexp) - (imenu-generic-expression - . ,`(("Prompt" - ,(concat eshell-prompt-regexp - "\\(.*\\)") - 1))))) - (set (make-local-variable (car setting)) (cdr setting))) - (dolist (binding `(("C-d" . +eshell-quit-or-delete-char))) - (define-key eshell-mode-map + (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) + #'eshell-bol) + (+eshell-eval-after-load + ;; Set local settings + (dolist (setting (list (cons 'outline-regexp eshell-prompt-regexp) + (cons 'page-delimiter eshell-prompt-regexp) + (cons 'imenu-generic-expression + (list "Prompt" + (concat eshell-prompt-regexp + "\\(.*\\)") + 1)))) + (set (make-local-variable (car setting)) (cdr setting))) + ;; Bind keys + (dolist (binding '(("C-d" . +eshell-quit-or-delete-char))) + (define-key eshell-mode-map (kbd (car binding)) (cdr binding))) - (dolist (environment `(("PAGER" . "cat"))) - (setenv (car environment) (cdr environment)))))) + ;; Environment variables + (dolist (environment '(("PAGER" . "cat"))) + (setenv (car environment) (cdr environment))))) (setup eww (:also-load +eww) @@ -560,6 +562,10 @@ (with-eval-after-load 'user-save (advice-add 'org-export-dispatch :before 'user-save-run-hooks))) +(setup password-cache + (:option password-cache t + password-cache-expiry (* 60 60))) + (setup prog (:local-set comment-auto-fill-only-comments t) (:hook #'prettify-symbols-mode @@ -591,7 +597,8 @@ (setup time (:option display-time-format "%H:%M" - display-time-default-load-average nil) + display-time-default-load-average nil + display-time-mail-file :disable) (display-time-mode +1)) (setup (:straight 0x0) @@ -663,12 +670,6 @@ ;;cape-dict)) (add-to-list 'completion-at-point-functions fn :append))))) -(setup (:straight (capf-autosuggest - :host nil - :repo "https://repo.or.cz/emacs-capf-autosuggest.git")) - (:hook-into eshell-mode - comint-mode)) - (setup (:straight circe) (:require _circe +circe) @@ -842,6 +843,8 @@ (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset)) (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs)) +(setup (:straight clhs)) + (setup (:straight consult) (:also-load +consult) ;; from Consult wiki @@ -1062,6 +1065,11 @@ See also `crux-reopen-as-root-mode'." (setup (:straight eshell-syntax-highlighting) (:hook-into eshell-mode)) +(setup (:straight eshell-vterm) + (:load-after eshell) + (defalias 'eshell/v 'eshell-exec-visual) + (eshell-vterm-mode +1)) + (setup (:straight-when exec-path-from-shell (eq system-system 'linux)) (require 'exec-path-from-shell) @@ -1130,7 +1138,7 @@ See also `crux-reopen-as-root-mode'." (let (schemes) (dolist (scheme '(("scheme" . geiser-chez) ; chez ("petite" . geiser-chez) ; petite - ("csi" . geiser-chicken) ; chicken + ("csi" . geiser-chicken) ; chicken ("gsi" . geiser-gambit) ("gosh" . geiser-gauche) ("guile" . geiser-guile) @@ -1276,8 +1284,12 @@ See also `crux-reopen-as-root-mode'." (+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi)) (setup (:straight mwim) - (:+key "C-a" #'mwim-beginning - "C-e" #'mwim-end)) + (:require +mwim) + (:option +mwim-passthrough-modes '(comint-mode + eshell-mode + vterm-mode)) + (:+key "C-a" #'+mwim-beginning-maybe + "C-e" #'+mwim-end-maybe)) (setup (:straight orderless) (:also-load +orderless) @@ -1392,6 +1404,17 @@ See also `crux-reopen-as-root-mode'." +modeline-position))) (simple-modeline-mode +1)) +(setup (:straight-when sly + (defvar +lisp-bin (executable-find "sbcl"))) + (:also-load sly-autoloads + +sly) + (:option inferior-lisp-program +lisp-bin + sly-kill-without-query-p t) + (:with-feature sly-mrepl + (dolist (key '("RET" "")) + (:bind key #'sly-mrepl-return-at-end)) + (:bind "C-c C-c" #'sly-mrepl-return))) + (setup (:straight smartscan) (:with-map smartscan-map (:bind "M-'" nil)) @@ -1423,6 +1446,10 @@ See also `crux-reopen-as-root-mode'." (auto-save-visited-mode -1) (super-save-mode +1)) +(setup (:straight-when systemd + (executable-find "systemd")) + (:option systemd-man-function 'woman)) + (setup (:straight (titlecase :host github :repo "duckwork/titlecase.el" @@ -1541,6 +1568,17 @@ See also `crux-reopen-as-root-mode'." (setup (:straight vlf) (:require vlf-setup)) +(setup (:straight-when vterm + (and module-file-suffix + (executable-find "cmake"))) + (:also-load +vterm) + (:option vterm-always-compile-module t + vterm-buffer-name-string "vterm: %s" + vterm-max-scrollback 100000 ; max allowed by vterm-module.h + ) + (advice-add 'counsel-yank-pop-action :around + #'+vterm-counsel-yank-pop-action)) + (setup (:straight web-mode) (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php" "asp" "gsp" "jsp" "ascx" "aspx" -- cgit 1.4.1-21-gabe81