summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el90
1 files changed, 64 insertions, 26 deletions
diff --git a/init.el b/init.el index 63d0f87..5a9ee62 100644 --- a/init.el +++ b/init.el
@@ -295,23 +295,25 @@
295 eshell-scroll-to-bottom-on-input 'all 295 eshell-scroll-to-bottom-on-input 'all
296 eshell-smart-space-goes-to-end t 296 eshell-smart-space-goes-to-end t
297 eshell-where-to-jump 'begin) 297 eshell-where-to-jump 'begin)
298 (add-hook 'eshell-mode-hook 298 (setf (alist-get 'eshell-mode mwim-beginning-of-line-function)
299 (defun +eshell@setup () 299 #'eshell-bol)
300 "Eshell improperly does loading. Gah." 300 (+eshell-eval-after-load
301 (interactive) 301 ;; Set local settings
302 (dolist (setting `((outline-regexp . ,eshell-prompt-regexp) 302 (dolist (setting (list (cons 'outline-regexp eshell-prompt-regexp)
303 (page-delimiter . ,eshell-prompt-regexp) 303 (cons 'page-delimiter eshell-prompt-regexp)
304 (imenu-generic-expression 304 (cons 'imenu-generic-expression
305 . ,`(("Prompt" 305 (list "Prompt"
306 ,(concat eshell-prompt-regexp 306 (concat eshell-prompt-regexp
307 "\\(.*\\)") 307 "\\(.*\\)")
308 1))))) 308 1))))
309 (set (make-local-variable (car setting)) (cdr setting))) 309 (set (make-local-variable (car setting)) (cdr setting)))
310 (dolist (binding `(("C-d" . +eshell-quit-or-delete-char))) 310 ;; Bind keys
311 (define-key eshell-mode-map 311 (dolist (binding '(("C-d" . +eshell-quit-or-delete-char)))
312 (define-key eshell-mode-map
312 (kbd (car binding)) (cdr binding))) 313 (kbd (car binding)) (cdr binding)))
313 (dolist (environment `(("PAGER" . "cat"))) 314 ;; Environment variables
314 (setenv (car environment) (cdr environment)))))) 315 (dolist (environment '(("PAGER" . "cat")))
316 (setenv (car environment) (cdr environment)))))
315 317
316(setup eww 318(setup eww
317 (:also-load +eww) 319 (:also-load +eww)
@@ -560,6 +562,10 @@
560 (with-eval-after-load 'user-save 562 (with-eval-after-load 'user-save
561 (advice-add 'org-export-dispatch :before 'user-save-run-hooks))) 563 (advice-add 'org-export-dispatch :before 'user-save-run-hooks)))
562 564
565(setup password-cache
566 (:option password-cache t
567 password-cache-expiry (* 60 60)))
568
563(setup prog 569(setup prog
564 (:local-set comment-auto-fill-only-comments t) 570 (:local-set comment-auto-fill-only-comments t)
565 (:hook #'prettify-symbols-mode 571 (:hook #'prettify-symbols-mode
@@ -601,7 +607,8 @@
601 607
602(setup time 608(setup time
603 (:option display-time-format "%H:%M" 609 (:option display-time-format "%H:%M"
604 display-time-default-load-average nil) 610 display-time-default-load-average nil
611 display-time-mail-file :disable)
605 (display-time-mode +1)) 612 (display-time-mode +1))
606 613
607(setup (:straight 0x0) 614(setup (:straight 0x0)
@@ -673,12 +680,6 @@
673 ;;cape-dict)) 680 ;;cape-dict))
674 (add-to-list 'completion-at-point-functions fn :append))))) 681 (add-to-list 'completion-at-point-functions fn :append)))))
675 682
676(setup (:straight (capf-autosuggest
677 :host nil
678 :repo "https://repo.or.cz/emacs-capf-autosuggest.git"))
679 (:hook-into eshell-mode
680 comint-mode))
681
682(setup (:straight circe) 683(setup (:straight circe)
683 (:require _circe 684 (:require _circe
684 +circe) 685 +circe)
@@ -852,6 +853,8 @@
852 (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset)) 853 (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset))
853 (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs)) 854 (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs))
854 855
856(setup (:straight clhs))
857
855(setup (:straight consult) 858(setup (:straight consult)
856 (:also-load +consult) 859 (:also-load +consult)
857 ;; from Consult wiki 860 ;; from Consult wiki
@@ -1072,6 +1075,11 @@ See also `crux-reopen-as-root-mode'."
1072(setup (:straight eshell-syntax-highlighting) 1075(setup (:straight eshell-syntax-highlighting)
1073 (:hook-into eshell-mode)) 1076 (:hook-into eshell-mode))
1074 1077
1078(setup (:straight eshell-vterm)
1079 (:load-after eshell)
1080 (defalias 'eshell/v 'eshell-exec-visual)
1081 (eshell-vterm-mode +1))
1082
1075(setup (:straight-when exec-path-from-shell 1083(setup (:straight-when exec-path-from-shell
1076 (eq system-system 'linux)) 1084 (eq system-system 'linux))
1077 (require 'exec-path-from-shell) 1085 (require 'exec-path-from-shell)
@@ -1140,7 +1148,7 @@ See also `crux-reopen-as-root-mode'."
1140 (let (schemes) 1148 (let (schemes)
1141 (dolist (scheme '(("scheme" . geiser-chez) ; chez 1149 (dolist (scheme '(("scheme" . geiser-chez) ; chez
1142 ("petite" . geiser-chez) ; petite 1150 ("petite" . geiser-chez) ; petite
1143 ("csi" . geiser-chicken) ; chicken 1151 ("csi" . geiser-chicken) ; chicken
1144 ("gsi" . geiser-gambit) 1152 ("gsi" . geiser-gambit)
1145 ("gosh" . geiser-gauche) 1153 ("gosh" . geiser-gauche)
1146 ("guile" . geiser-guile) 1154 ("guile" . geiser-guile)
@@ -1286,8 +1294,12 @@ See also `crux-reopen-as-root-mode'."
1286 (+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi)) 1294 (+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi))
1287 1295
1288(setup (:straight mwim) 1296(setup (:straight mwim)
1289 (:+key "C-a" #'mwim-beginning 1297 (:require +mwim)
1290 "C-e" #'mwim-end)) 1298 (:option +mwim-passthrough-modes '(comint-mode
1299 eshell-mode
1300 vterm-mode))
1301 (:+key "C-a" #'+mwim-beginning-maybe
1302 "C-e" #'+mwim-end-maybe))
1291 1303
1292(setup (:straight orderless) 1304(setup (:straight orderless)
1293 (:also-load +orderless) 1305 (:also-load +orderless)
@@ -1402,6 +1414,17 @@ See also `crux-reopen-as-root-mode'."
1402 +modeline-position))) 1414 +modeline-position)))
1403 (simple-modeline-mode +1)) 1415 (simple-modeline-mode +1))
1404 1416
1417(setup (:straight-when sly
1418 (defvar +lisp-bin (executable-find "sbcl")))
1419 (:also-load sly-autoloads
1420 +sly)
1421 (:option inferior-lisp-program +lisp-bin
1422 sly-kill-without-query-p t)
1423 (:with-feature sly-mrepl
1424 (dolist (key '("RET" "<return>"))
1425 (:bind key #'sly-mrepl-return-at-end))
1426 (:bind "C-c C-c" #'sly-mrepl-return)))
1427
1405(setup (:straight smartscan) 1428(setup (:straight smartscan)
1406 (:with-map smartscan-map 1429 (:with-map smartscan-map
1407 (:bind "M-'" nil)) 1430 (:bind "M-'" nil))
@@ -1433,6 +1456,10 @@ See also `crux-reopen-as-root-mode'."
1433 (auto-save-visited-mode -1) 1456 (auto-save-visited-mode -1)
1434 (super-save-mode +1)) 1457 (super-save-mode +1))
1435 1458
1459(setup (:straight-when systemd
1460 (executable-find "systemd"))
1461 (:option systemd-man-function 'woman))
1462
1436(setup (:straight (titlecase 1463(setup (:straight (titlecase
1437 :host github 1464 :host github
1438 :repo "duckwork/titlecase.el" 1465 :repo "duckwork/titlecase.el"
@@ -1551,6 +1578,17 @@ See also `crux-reopen-as-root-mode'."
1551(setup (:straight vlf) 1578(setup (:straight vlf)
1552 (:require vlf-setup)) 1579 (:require vlf-setup))
1553 1580
1581(setup (:straight-when vterm
1582 (and module-file-suffix
1583 (executable-find "cmake")))
1584 (:also-load +vterm)
1585 (:option vterm-always-compile-module t
1586 vterm-buffer-name-string "vterm: %s"
1587 vterm-max-scrollback 100000 ; max allowed by vterm-module.h
1588 )
1589 (advice-add 'counsel-yank-pop-action :around
1590 #'+vterm-counsel-yank-pop-action))
1591
1554(setup (:straight web-mode) 1592(setup (:straight web-mode)
1555 (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php" 1593 (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php"
1556 "asp" "gsp" "jsp" "ascx" "aspx" 1594 "asp" "gsp" "jsp" "ascx" "aspx"