diff options
-rw-r--r-- | init.el | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/init.el b/init.el index dc4bb74..7058e36 100644 --- a/init.el +++ b/init.el | |||
@@ -196,8 +196,8 @@ | |||
196 | dired-listing-switches "-Al" | 196 | dired-listing-switches "-Al" |
197 | ls-lisp-dirs-first t | 197 | ls-lisp-dirs-first t |
198 | dired-ls-F-marks-symlinks t | 198 | dired-ls-F-marks-symlinks t |
199 | dired-no-confirm '(byte-compile load | 199 | dired-no-confirm '(byte-compile |
200 | chgrp chmod chown | 200 | load chgrp chmod chown |
201 | copy move hardlink symlink | 201 | copy move hardlink symlink |
202 | shell touch) | 202 | shell touch) |
203 | dired-dwim-target t) | 203 | dired-dwim-target t) |
@@ -347,19 +347,19 @@ | |||
347 | 347 | ||
348 | (setup org | 348 | (setup org |
349 | ;; Plain org with the `setup' form for sorting, but I install with straight. | 349 | ;; Plain org with the `setup' form for sorting, but I install with straight. |
350 | (:straight (org | 350 | (:straight (org |
351 | :type git :host nil | 351 | :type git :host nil |
352 | :repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" | 352 | :repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" |
353 | :local-repo "org" | 353 | :local-repo "org" |
354 | :depth full | 354 | :depth full |
355 | :pre-build (straight-recipes-org-elpa--build) | 355 | :pre-build (straight-recipes-org-elpa--build) |
356 | :build (:not autoloads) | 356 | :build (:not autoloads) |
357 | :files (:defaults | 357 | :files (:defaults |
358 | "lisp/*.el" | 358 | "lisp/*.el" |
359 | ("etc/styles/" "etc/styles/*"))) | 359 | ("etc/styles/" "etc/styles/*"))) |
360 | (org-contrib | 360 | (org-contrib |
361 | :type git :host nil | 361 | :type git :host nil |
362 | :repo "https://git.sr.ht/~bzg/org-contrib")) | 362 | :repo "https://git.sr.ht/~bzg/org-contrib")) |
363 | ;; DO NOT load system-installed org !!! | 363 | ;; DO NOT load system-installed org !!! |
364 | (setq load-path (cl-remove-if (lambda (path) | 364 | (setq load-path (cl-remove-if (lambda (path) |
365 | (string-match-p "lisp/org\\'" path)) | 365 | (string-match-p "lisp/org\\'" path)) |
@@ -494,7 +494,7 @@ | |||
494 | cape-abbrev | 494 | cape-abbrev |
495 | cape-ispell | 495 | cape-ispell |
496 | ;;cape-dict)) | 496 | ;;cape-dict)) |
497 | (add-to-list 'completion-at-point-functions fn :append))))) | 497 | (add-to-list 'completion-at-point-functions fn :append))))) |
498 | 498 | ||
499 | (setup (:straight (capf-autosuggest | 499 | (setup (:straight (capf-autosuggest |
500 | :host nil | 500 | :host nil |
@@ -596,67 +596,67 @@ | |||
596 | (:also-load +consult) | 596 | (:also-load +consult) |
597 | ;; from Consult wiki | 597 | ;; from Consult wiki |
598 | (:option register-preview-delay 0 | 598 | (:option register-preview-delay 0 |
599 | register-preview-function 'consult-register-format | 599 | register-preview-function 'consult-register-format |
600 | xref-show-xrefs-function 'consult-xref | 600 | xref-show-xrefs-function 'consult-xref |
601 | xref-show-definitions-function 'consult-xref | 601 | xref-show-definitions-function 'consult-xref |
602 | tab-always-indent 'complete | 602 | tab-always-indent 'complete |
603 | completion-in-region-function 'consult-completion-in-region) | 603 | completion-in-region-function 'consult-completion-in-region) |
604 | (advice-add #'register-preview :override #'consult-register-window) | 604 | (advice-add #'register-preview :override #'consult-register-window) |
605 | (advice-add #'completing-read-multiple :override | 605 | (advice-add #'completing-read-multiple :override |
606 | #'consult-completing-read-multiple) | 606 | #'consult-completing-read-multiple) |
607 | (dolist (binding '(;; C-c bindings (mode-specific-map) | 607 | (dolist (binding '(;; C-c bindings (mode-specific-map) |
608 | ("C-c h" . consult-history) | 608 | ("C-c h" . consult-history) |
609 | ("C-c m" . consult-mode-command) | 609 | ("C-c m" . consult-mode-command) |
610 | ("C-c b" . consult-bookmark) | 610 | ("C-c b" . consult-bookmark) |
611 | ("C-c k" . consult-kmacro) | 611 | ("C-c k" . consult-kmacro) |
612 | ;; C-x bindings (ctl-x-map) | 612 | ;; C-x bindings (ctl-x-map) |
613 | ("C-x M-:" . consult-complex-command) | 613 | ("C-x M-:" . consult-complex-command) |
614 | ("C-x b" . consult-buffer) | 614 | ("C-x b" . consult-buffer) |
615 | ("C-x 4 b" . consult-buffer-other-window) | 615 | ("C-x 4 b" . consult-buffer-other-window) |
616 | ("C-x 5 b" . consult-buffer-other-frame) | 616 | ("C-x 5 b" . consult-buffer-other-frame) |
617 | ;; Custom M-# bindings for fast register access | 617 | ;; Custom M-# bindings for fast register access |
618 | ("M-#" . consult-register-load) | 618 | ("M-#" . consult-register-load) |
619 | ("M-'" . consult-register-store) | 619 | ("M-'" . consult-register-store) |
620 | ("C-M-#" . consult-register) | 620 | ("C-M-#" . consult-register) |
621 | ;; Other custom bindings | 621 | ;; Other custom bindings |
622 | ("M-y" . consult-yank-pop) | 622 | ("M-y" . consult-yank-pop) |
623 | ("<f1> a" . consult-apropos) | 623 | ("<f1> a" . consult-apropos) |
624 | ;; M-g bindings (goto-map) | 624 | ;; M-g bindings (goto-map) |
625 | ("M-g e" . consult-compile-error) | 625 | ("M-g e" . consult-compile-error) |
626 | ("M-g f" . consult-flymake) ; or consult-flycheck | 626 | ("M-g f" . consult-flymake) ; or consult-flycheck |
627 | ("M-g g" . consult-goto-line) | 627 | ("M-g g" . consult-goto-line) |
628 | ("M-g M-g" . consult-goto-line) | 628 | ("M-g M-g" . consult-goto-line) |
629 | ("M-g o" . consult-outline) ; or consult-org-heading | 629 | ("M-g o" . consult-outline) ; or consult-org-heading |
630 | ("M-g m" . consult-mark) | 630 | ("M-g m" . consult-mark) |
631 | ("M-g k" . consult-global-mark) | 631 | ("M-g k" . consult-global-mark) |
632 | ("M-g i" . consult-imenu) | 632 | ("M-g i" . consult-imenu) |
633 | ("M-g I" . consult-imenu-multi) | 633 | ("M-g I" . consult-imenu-multi) |
634 | ;; M-s bindings (search-map) | 634 | ;; M-s bindings (search-map) |
635 | ("M-s f" . consult-find) | 635 | ("M-s f" . consult-find) |
636 | ("M-s F" . consult-locate) | 636 | ("M-s F" . consult-locate) |
637 | ("M-s g" . consult-grep) | 637 | ("M-s g" . consult-grep) |
638 | ("M-s G" . consult-git-grep) | 638 | ("M-s G" . consult-git-grep) |
639 | ("M-s r" . consult-ripgrep) | 639 | ("M-s r" . consult-ripgrep) |
640 | ("M-s l" . consult-line) | 640 | ("M-s l" . consult-line) |
641 | ("M-s L" . consult-line-multi) | 641 | ("M-s L" . consult-line-multi) |
642 | ("M-s m" . consult-multi-occur) | 642 | ("M-s m" . consult-multi-occur) |
643 | ("M-s k" . consult-keep-lines) | 643 | ("M-s k" . consult-keep-lines) |
644 | ("M-s u" . consult-focus-lines) | 644 | ("M-s u" . consult-focus-lines) |
645 | ;; Isearch integration | 645 | ;; Isearch integration |
646 | ("M-s e" . consult-isearch-history))) | 646 | ("M-s e" . consult-isearch-history))) |
647 | (define-key +key-mode-map (kbd (car binding)) (cdr binding))) | 647 | (define-key +key-mode-map (kbd (car binding)) (cdr binding))) |
648 | (with-eval-after-load 'isearch-mode | 648 | (with-eval-after-load 'isearch-mode |
649 | (dolist (binding '(("M-e" . consult-isearch-history) | 649 | (dolist (binding '(("M-e" . consult-isearch-history) |
650 | ("M-s e" . consult-isearch-history) | 650 | ("M-s e" . consult-isearch-history) |
651 | ("M-s l" . consult-line) | 651 | ("M-s l" . consult-line) |
652 | ("M-s L" . consult-line-multi))) | 652 | ("M-s L" . consult-line-multi))) |
653 | (define-key isearch-mode-map (car binding) (cdr binding)))) | 653 | (define-key isearch-mode-map (car binding) (cdr binding)))) |
654 | (with-eval-after-load 'org-mode | 654 | (with-eval-after-load 'org-mode |
655 | (define-key org-mode-map "M-g o" 'consult-org-heading)) | 655 | (define-key org-mode-map "M-g o" 'consult-org-heading)) |
656 | (advice-add 'consult-yank-pop :after '+yank@indent) | 656 | (advice-add 'consult-yank-pop :after '+yank@indent) |
657 | (with-eval-after-load 'consult | 657 | (with-eval-after-load 'consult |
658 | (:option consult-narrow-key "<" | 658 | (:option consult-narrow-key "<" |
659 | consult-project-root-function '+consult-project-root) | 659 | consult-project-root-function '+consult-project-root) |
660 | (consult-customize | 660 | (consult-customize |
661 | consult-theme | 661 | consult-theme |
662 | :preview-key '(:debounce 0.2 any) | 662 | :preview-key '(:debounce 0.2 any) |
@@ -837,7 +837,7 @@ See also `crux-reopen-as-root-mode'." | |||
837 | 837 | ||
838 | (setup (:straight hungry-delete) | 838 | (setup (:straight hungry-delete) |
839 | (:option hungry-delete-chars-to-skip " \t" | 839 | (:option hungry-delete-chars-to-skip " \t" |
840 | hungry-delete-join-reluctantly nil) | 840 | hungry-delete-join-reluctantly nil) |
841 | (:bind-into paredit | 841 | (:bind-into paredit |
842 | ;; I define these functions here because they really require both packages | 842 | ;; I define these functions here because they really require both packages |
843 | ;; to make any sense. So, would I put them in `+hungry-delete' or | 843 | ;; to make any sense. So, would I put them in `+hungry-delete' or |
@@ -846,14 +846,14 @@ See also `crux-reopen-as-root-mode'." | |||
846 | (defun acdw/paredit-hungry-delete-backward (arg) | 846 | (defun acdw/paredit-hungry-delete-backward (arg) |
847 | (interactive "P") | 847 | (interactive "P") |
848 | (if (looking-back "[ \t]" 1) | 848 | (if (looking-back "[ \t]" 1) |
849 | (hungry-delete-backward (or arg 1)) | 849 | (hungry-delete-backward (or arg 1)) |
850 | (paredit-backward-delete arg))) | 850 | (paredit-backward-delete arg))) |
851 | [remap paredit-forward-delete] | 851 | [remap paredit-forward-delete] |
852 | (defun acdw/paredit-hungry-delete-forward (arg) | 852 | (defun acdw/paredit-hungry-delete-forward (arg) |
853 | (interactive "P") | 853 | (interactive "P") |
854 | (if (looking-at "[ \t]") | 854 | (if (looking-at "[ \t]") |
855 | (hungry-delete-forward (or arg 1)) | 855 | (hungry-delete-forward (or arg 1)) |
856 | (paredit-forward-delete arg)))) | 856 | (paredit-forward-delete arg)))) |
857 | (global-hungry-delete-mode +1)) | 857 | (global-hungry-delete-mode +1)) |
858 | 858 | ||
859 | (setup (:straight isearch-mb) | 859 | (setup (:straight isearch-mb) |
@@ -862,19 +862,19 @@ See also `crux-reopen-as-root-mode'." | |||
862 | ;; project's README. | 862 | ;; project's README. |
863 | (with-eval-after-load 'isearch-mb | 863 | (with-eval-after-load 'isearch-mb |
864 | (dolist (spec '((isearch-mb--with-buffer | 864 | (dolist (spec '((isearch-mb--with-buffer |
865 | ("M-e" . consult-isearch) | 865 | ("M-e" . consult-isearch) |
866 | ("C-o" . loccur-isearch)) | 866 | ("C-o" . loccur-isearch)) |
867 | (isearch-mb--after-exit | 867 | (isearch-mb--after-exit |
868 | ("M-%" . anzu-isearch-query-replace) | 868 | ("M-%" . anzu-isearch-query-replace) |
869 | ("M-s l" . consult-line)))) | 869 | ("M-s l" . consult-line)))) |
870 | (let ((isearch-mb-list (car spec)) | 870 | (let ((isearch-mb-list (car spec)) |
871 | (isearch-mb-binds (cdr spec))) | 871 | (isearch-mb-binds (cdr spec))) |
872 | (dolist (cell isearch-mb-binds) | 872 | (dolist (cell isearch-mb-binds) |
873 | (let ((key (car cell)) | 873 | (let ((key (car cell)) |
874 | (command (cdr cell))) | 874 | (command (cdr cell))) |
875 | (when (fboundp command) | 875 | (when (fboundp command) |
876 | (add-to-list isearch-mb-list command) | 876 | (add-to-list isearch-mb-list command) |
877 | (define-key isearch-mb-minibuffer-map (kbd key) command))))))) | 877 | (define-key isearch-mb-minibuffer-map (kbd key) command))))))) |
878 | (isearch-mb-mode +1)) | 878 | (isearch-mb-mode +1)) |
879 | 879 | ||
880 | (setup (:straight-when keychain-environment | 880 | (setup (:straight-when keychain-environment |