summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-05-04 20:02:17 -0500
committerCase Duckworth2021-05-04 20:02:17 -0500
commit7372de33554414f744f02e6e8bb45f71fee6980e (patch)
tree9bc3168cdc4a4b674be60f247e1e25b6c4dc60da /init.el
parentChange which-key setup (diff)
parentRemap C-w to backward-kill-word if the region isn't active (diff)
downloademacs-7372de33554414f744f02e6e8bb45f71fee6980e.tar.gz
emacs-7372de33554414f744f02e6e8bb45f71fee6980e.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'init.el')
-rw-r--r--init.el99
1 files changed, 53 insertions, 46 deletions
diff --git a/init.el b/init.el index fdb28c5..07f856c 100644 --- a/init.el +++ b/init.el
@@ -53,9 +53,6 @@
53 no-littering-var-directory (acdw/dir)) 53 no-littering-var-directory (acdw/dir))
54 (require 'no-littering)) 54 (require 'no-littering))
55 55
56;;;; `idle-require'
57(setup (:straight idle-require))
58
59;;;; My packages 56;;;; My packages
60(when-let ((default-directory 57(when-let ((default-directory
61 (expand-file-name-exists-p "pkg/" user-emacs-directory))) 58 (expand-file-name-exists-p "pkg/" user-emacs-directory)))
@@ -266,8 +263,6 @@
266 (:option eshell-directory-name (acdw/dir "eshell/" t) 263 (:option eshell-directory-name (acdw/dir "eshell/" t)
267 eshell-aliases-file (acdw/dir "eshell/aliases" t)) 264 eshell-aliases-file (acdw/dir "eshell/aliases" t))
268 265
269 (idle-require 'eshell)
270
271 (defun eshell-quit-or-delete-char (arg) 266 (defun eshell-quit-or-delete-char (arg)
272 "Delete the character to the right, or quit eshell on an empty line." 267 "Delete the character to the right, or quit eshell on an empty line."
273 (interactive "p") 268 (interactive "p")
@@ -346,8 +341,6 @@
346 (when (not (file-exists-p gnus-directory)) 341 (when (not (file-exists-p gnus-directory))
347 (make-directory gnus-directory :parents)) 342 (make-directory gnus-directory :parents))
348 343
349 (idle-require 'gnus)
350
351 (:leader "m" gnus)) 344 (:leader "m" gnus))
352 345
353(setup imenu 346(setup imenu
@@ -563,7 +556,9 @@
563 w32-pass-apps-to-system nil 556 w32-pass-apps-to-system nil
564 w32-apps-modifier 'hyper)) 557 w32-apps-modifier 'hyper))
565 558
566;; "Et cetera" settings 559;;; "Et cetera" settings
560;; This should stay as /minimal/ as possible. Anything that can go somewhere
561;; else /should/ go there.
567(setup emacs 562(setup emacs
568 (:option disabled-command-function nil 563 (:option disabled-command-function nil
569 load-prefer-newer t 564 load-prefer-newer t
@@ -573,8 +568,12 @@
573 attempt-orderly-shutdown-on-fatal-signal nil 568 attempt-orderly-shutdown-on-fatal-signal nil
574 find-function-C-source-directory (acdw/find-emacs-source)) 569 find-function-C-source-directory (acdw/find-emacs-source))
575 570
576 (:global "M-=" count-words) 571 (:global "M-=" count-words
572 "C-w" acdw/kill-region-or-backward-word)
577 573
574 ;; Remap C-h to DEL -- <f1> can be the "help" key
575 (define-key key-translation-map [?\C-h] [?\C-?])
576
578 (:leader "C-c" save-buffers-kill-emacs 577 (:leader "C-c" save-buffers-kill-emacs
579 "t" acdw/insert-iso-date)) 578 "t" acdw/insert-iso-date))
580 579
@@ -613,10 +612,52 @@
613 (eval-after-load "isearch" 612 (eval-after-load "isearch"
614 '(define-key isearch-mode-map (kbd "C-'") #'avy-isearch))) 613 '(define-key isearch-mode-map (kbd "C-'") #'avy-isearch)))
615 614
616(setup (:straight (beginend 615(setup (:straight (beginend))
617 :fork (:repo "duckwork/beginend")))
618 (beginend-global-mode +1)) 616 (beginend-global-mode +1))
619 617
618(setup common-lisp-ide
619 (defvar acdw/cl-ide :sly)
620 (defvar acdw/lisp-bin (or (executable-find "sbcl")
621 (executable-find "clisp")))
622 (:needs acdw/lisp-bin)
623 (:option inferior-lisp-program acdw/lisp-bin)
624
625 (setup (:straight clhs))
626
627 (pcase acdw/cl-ide
628 (:slime
629 (setup (:straight slime)
630 (:also-load slime-autoloads)
631
632 (when-let ((slime-helper (or (expand-file-name-exists-p
633 "~/quicklisp/slime-helper.el")
634 (expand-file-name-exists-p
635 "~/var/quicklisp/slime-helper.el"))))
636 (load slime-helper))
637
638 (define-key slime-repl-mode-map (kbd "RET") #'slime-repl-return-at-end)
639 (define-key slime-repl-mode-map (kbd "<return>")
640 #'slime-repl-return-at-end)
641
642 (defun slime-repl-return-at-end ()
643 (interactive)
644 (if (<= (point-max) (point))
645 (slime-repl-return)
646 (slime-repl-newline-and-indent)))
647
648
649 (with-eval-after-load 'company
650 (setup (:straight slime-company)
651 (:option slime-company-completion 'fuzzy
652 slime-company-after-completion nil)
653 (slime-setup '(slime-fancy slime-company))))))
654
655 (:sly
656 (setup (:straight sly)
657 (:option sly-kill-without-query-p t)
658
659 (:also-load sly-autoloads)))))
660
620(setup (:straight (consult 661(setup (:straight (consult
621 :host github 662 :host github
622 :repo "minad/consult")) 663 :repo "minad/consult"))
@@ -749,9 +790,7 @@ if ripgrep is installed, otherwise `consult-grep'."
749 (require 'gemini-write)))) 790 (require 'gemini-write))))
750 791
751(setup (:straight expand-region) 792(setup (:straight expand-region)
752 (:global "C-=" er/expand-region) 793 (:global "C-=" er/expand-region))
753
754 (idle-require 'expand-region))
755 794
756(setup (:straight fennel-mode) 795(setup (:straight fennel-mode)
757 (:needs "fennel") 796 (:needs "fennel")
@@ -763,36 +802,6 @@ if ripgrep is installed, otherwise `consult-grep'."
763 802
764(setup (:straight geiser)) 803(setup (:straight geiser))
765 804
766(setup common-lisp-ide
767 (defvar acdw/cl-ide :sly)
768 (defvar acdw/lisp-bin (or (executable-find "sbcl")
769 (executable-find "clisp")))
770 (:needs acdw/lisp-bin)
771 (:option inferior-lisp-program acdw/lisp-bin)
772
773 (pcase acdw/cl-ide
774 (:slime
775 (setup (:straight slime)
776 (:also-load slime-autoloads)
777
778 (when-let ((slime-helper (or (expand-file-name-exists-p
779 "~/quicklisp/slime-helper.el")
780 (expand-file-name-exists-p
781 "~/var/quicklisp/slime-helper.el"))))
782 (load slime-helper))
783
784 (with-eval-after-load 'company
785 (setup (:straight slime-company)
786 (:option slime-company-completion 'fuzzy
787 slime-company-after-completion nil)
788 (slime-setup '(slime-fancy slime-company))))))
789
790 (:sly
791 (setup (:straight sly)
792 (:option sly-kill-without-query-p t)
793
794 (:also-load sly-autoloads)))))
795
796(setup (:straight (gemini-mode 805(setup (:straight (gemini-mode
797 :host nil 806 :host nil
798 :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) 807 :repo "https://git.carcosa.net/jmcbray/gemini.el.git"))
@@ -901,8 +910,6 @@ if ripgrep is installed, otherwise `consult-grep'."
901 org-tags-column (- 0 fill-column -3) 910 org-tags-column (- 0 fill-column -3)
902 org-directory "~/org") 911 org-directory "~/org")
903 912
904 (idle-require 'org)
905
906 (:bind "RET" acdw-org/return-dwim 913 (:bind "RET" acdw-org/return-dwim
907 "<S-return>" acdw-org/org-table-copy-down) 914 "<S-return>" acdw-org/org-table-copy-down)
908 915