diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 90 |
1 files changed, 64 insertions, 26 deletions
diff --git a/init.el b/init.el index 4136271..9f4d2fe 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 |
@@ -591,7 +597,8 @@ | |||
591 | 597 | ||
592 | (setup time | 598 | (setup time |
593 | (:option display-time-format "%H:%M" | 599 | (:option display-time-format "%H:%M" |
594 | display-time-default-load-average nil) | 600 | display-time-default-load-average nil |
601 | display-time-mail-file :disable) | ||
595 | (display-time-mode +1)) | 602 | (display-time-mode +1)) |
596 | 603 | ||
597 | (setup (:straight 0x0) | 604 | (setup (:straight 0x0) |
@@ -663,12 +670,6 @@ | |||
663 | ;;cape-dict)) | 670 | ;;cape-dict)) |
664 | (add-to-list 'completion-at-point-functions fn :append))))) | 671 | (add-to-list 'completion-at-point-functions fn :append))))) |
665 | 672 | ||
666 | (setup (:straight (capf-autosuggest | ||
667 | :host nil | ||
668 | :repo "https://repo.or.cz/emacs-capf-autosuggest.git")) | ||
669 | (:hook-into eshell-mode | ||
670 | comint-mode)) | ||
671 | |||
672 | (setup (:straight circe) | 673 | (setup (:straight circe) |
673 | (:require _circe | 674 | (:require _circe |
674 | +circe) | 675 | +circe) |
@@ -842,6 +843,8 @@ | |||
842 | (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset)) | 843 | (add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset)) |
843 | (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs)) | 844 | (add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs)) |
844 | 845 | ||
846 | (setup (:straight clhs)) | ||
847 | |||
845 | (setup (:straight consult) | 848 | (setup (:straight consult) |
846 | (:also-load +consult) | 849 | (:also-load +consult) |
847 | ;; from Consult wiki | 850 | ;; from Consult wiki |
@@ -1062,6 +1065,11 @@ See also `crux-reopen-as-root-mode'." | |||
1062 | (setup (:straight eshell-syntax-highlighting) | 1065 | (setup (:straight eshell-syntax-highlighting) |
1063 | (:hook-into eshell-mode)) | 1066 | (:hook-into eshell-mode)) |
1064 | 1067 | ||
1068 | (setup (:straight eshell-vterm) | ||
1069 | (:load-after eshell) | ||
1070 | (defalias 'eshell/v 'eshell-exec-visual) | ||
1071 | (eshell-vterm-mode +1)) | ||
1072 | |||
1065 | (setup (:straight-when exec-path-from-shell | 1073 | (setup (:straight-when exec-path-from-shell |
1066 | (eq system-system 'linux)) | 1074 | (eq system-system 'linux)) |
1067 | (require 'exec-path-from-shell) | 1075 | (require 'exec-path-from-shell) |
@@ -1130,7 +1138,7 @@ See also `crux-reopen-as-root-mode'." | |||
1130 | (let (schemes) | 1138 | (let (schemes) |
1131 | (dolist (scheme '(("scheme" . geiser-chez) ; chez | 1139 | (dolist (scheme '(("scheme" . geiser-chez) ; chez |
1132 | ("petite" . geiser-chez) ; petite | 1140 | ("petite" . geiser-chez) ; petite |
1133 | ("csi" . geiser-chicken) ; chicken | 1141 | ("csi" . geiser-chicken) ; chicken |
1134 | ("gsi" . geiser-gambit) | 1142 | ("gsi" . geiser-gambit) |
1135 | ("gosh" . geiser-gauche) | 1143 | ("gosh" . geiser-gauche) |
1136 | ("guile" . geiser-guile) | 1144 | ("guile" . geiser-guile) |
@@ -1276,8 +1284,12 @@ See also `crux-reopen-as-root-mode'." | |||
1276 | (+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi)) | 1284 | (+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi)) |
1277 | 1285 | ||
1278 | (setup (:straight mwim) | 1286 | (setup (:straight mwim) |
1279 | (:+key "C-a" #'mwim-beginning | 1287 | (:require +mwim) |
1280 | "C-e" #'mwim-end)) | 1288 | (:option +mwim-passthrough-modes '(comint-mode |
1289 | eshell-mode | ||
1290 | vterm-mode)) | ||
1291 | (:+key "C-a" #'+mwim-beginning-maybe | ||
1292 | "C-e" #'+mwim-end-maybe)) | ||
1281 | 1293 | ||
1282 | (setup (:straight orderless) | 1294 | (setup (:straight orderless) |
1283 | (:also-load +orderless) | 1295 | (:also-load +orderless) |
@@ -1392,6 +1404,17 @@ See also `crux-reopen-as-root-mode'." | |||
1392 | +modeline-position))) | 1404 | +modeline-position))) |
1393 | (simple-modeline-mode +1)) | 1405 | (simple-modeline-mode +1)) |
1394 | 1406 | ||
1407 | (setup (:straight-when sly | ||
1408 | (defvar +lisp-bin (executable-find "sbcl"))) | ||
1409 | (:also-load sly-autoloads | ||
1410 | +sly) | ||
1411 | (:option inferior-lisp-program +lisp-bin | ||
1412 | sly-kill-without-query-p t) | ||
1413 | (:with-feature sly-mrepl | ||
1414 | (dolist (key '("RET" "<return>")) | ||
1415 | (:bind key #'sly-mrepl-return-at-end)) | ||
1416 | (:bind "C-c C-c" #'sly-mrepl-return))) | ||
1417 | |||
1395 | (setup (:straight smartscan) | 1418 | (setup (:straight smartscan) |
1396 | (:with-map smartscan-map | 1419 | (:with-map smartscan-map |
1397 | (:bind "M-'" nil)) | 1420 | (:bind "M-'" nil)) |
@@ -1423,6 +1446,10 @@ See also `crux-reopen-as-root-mode'." | |||
1423 | (auto-save-visited-mode -1) | 1446 | (auto-save-visited-mode -1) |
1424 | (super-save-mode +1)) | 1447 | (super-save-mode +1)) |
1425 | 1448 | ||
1449 | (setup (:straight-when systemd | ||
1450 | (executable-find "systemd")) | ||
1451 | (:option systemd-man-function 'woman)) | ||
1452 | |||
1426 | (setup (:straight (titlecase | 1453 | (setup (:straight (titlecase |
1427 | :host github | 1454 | :host github |
1428 | :repo "duckwork/titlecase.el" | 1455 | :repo "duckwork/titlecase.el" |
@@ -1541,6 +1568,17 @@ See also `crux-reopen-as-root-mode'." | |||
1541 | (setup (:straight vlf) | 1568 | (setup (:straight vlf) |
1542 | (:require vlf-setup)) | 1569 | (:require vlf-setup)) |
1543 | 1570 | ||
1571 | (setup (:straight-when vterm | ||
1572 | (and module-file-suffix | ||
1573 | (executable-find "cmake"))) | ||
1574 | (:also-load +vterm) | ||
1575 | (:option vterm-always-compile-module t | ||
1576 | vterm-buffer-name-string "vterm: %s" | ||
1577 | vterm-max-scrollback 100000 ; max allowed by vterm-module.h | ||
1578 | ) | ||
1579 | (advice-add 'counsel-yank-pop-action :around | ||
1580 | #'+vterm-counsel-yank-pop-action)) | ||
1581 | |||
1544 | (setup (:straight web-mode) | 1582 | (setup (:straight web-mode) |
1545 | (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php" | 1583 | (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php" |
1546 | "asp" "gsp" "jsp" "ascx" "aspx" | 1584 | "asp" "gsp" "jsp" "ascx" "aspx" |