doom config updates

This commit is contained in:
Matt Nish-Lapidus 2024-12-07 11:16:25 -05:00
parent f3cfad8f48
commit 20b35a3b70
3 changed files with 190 additions and 141 deletions

View file

@ -1,5 +1,7 @@
;;; bindings.el -*- lexical-binding: t; -*-
(cua-mode +1)
(map! (:when (modulep! :ui popup)
"C-`" #'+popup/toggle
"C-~" #'+popup/raise)
@ -415,19 +417,19 @@
:map lisp-mode-map
:desc "Load cl-patterns helpers" "p" #'cl-patterns-helpers-load)
;; (map! :map smartparens-mode-map
;; "M-[" #'sp-forward-barf-sexp
;; "M-]" #'sp-forward-slurp-sexp
;; "M-{" #'sp-backward-slurp-sexp
;; "M-}" #'sp-backward-barf-sexp
;; "M-)" #'sp-split-sexp
;; "M-(" #'sp-splice-sexp
;; "C-(" #'sp-wrap-round
;; "C-)" #'sp-unwrap-sexp
;; "C-[" #'sp-wrap-square
;; "C-]" #'sp-unwrap-sexp
;; "C-{" #'sp-wrap-curly
;; "C-}" #'sp-unwrap-sexp)
(map! :map smartparens-mode-map
"M-[" #'sp-forward-barf-sexp
"M-]" #'sp-forward-slurp-sexp
"M-{" #'sp-backward-slurp-sexp
"M-}" #'sp-backward-barf-sexp
"M-)" #'sp-split-sexp
"M-(" #'sp-splice-sexp
"C-(" #'sp-wrap-round
"C-)" #'sp-unwrap-sexp
"C-[" #'sp-wrap-square
"C-]" #'sp-unwrap-sexp
"C-{" #'sp-wrap-curly
"C-}" #'sp-unwrap-sexp)
;; platform io local leader bindings
(map! :map platformio-mode-map
@ -496,7 +498,8 @@
:desc "View Action" "v" #'mu4e-view-action
:desc "Reply All (Wide)" "w" #'mu4e-compose-wide-reply
:desc "Reply" "r" #'mu4e-compose-reply
:desc "Save Attachments" "a" #'mu4e-view-save-attachments)
:desc "Save Attachments" "a" #'mu4e-view-save-attachments
:desc "Save All Attachments" "A" #'mu4e-view-save-all-attachments)
(map! :map mu4e-main-mode-map
"u" #'mu4e-update-mail-and-index)

View file

@ -22,6 +22,13 @@
(setq scroll-preserve-screen-position t)
(setq global-hl-line-modes nil)
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame
(scroll-bar-mode -1))))
(scroll-bar-mode -1))
;; (custom-set-faces!
;; '(line-number :foreground "#424242"))
@ -32,7 +39,7 @@
(setq org-directory "~/Documents/Obsidian/Primary")
(use-package! kbd-mode)
(use-package! kbd-mode :defer t)
;; Modeline
;; - add current workspace name
@ -98,7 +105,7 @@
(global-so-long-mode 1)
(after! parinfer-rust-mode
(setq parinfer-rust-auto-download f)
(setq parinfer-rust-auto-download nil)
(setq parinfer-rust-preferred-mode "smart"))
(setq dap-ui-variable-length 200)
@ -236,15 +243,18 @@
(after! gcode-mode
(add-hook! 'gcode-mode-hook 'eldoc-mode))
;; (use-package! tramp
;; :init
;; ;; Make sure we work on remote guixsd machines :)
;; ;; probably only helps if you start on a guixsd machine..!
;; (setq tramp-remote-path
;; (append path-tramp-remote
;; '("~/.guix-profile/bin" "~/.guix-profile/sbin"
;; "/run/current-system/profile/bin"
;; "/run/current-system/profile/sbin"))))
(use-package!
tramp
:defer t
:config
;; To “turn off” the backup feature for remote files and stop TRAMP from saving to the backup directory.
;; See https://www.gnu.org/software/tramp/#Auto_002dsave-File-Lock-and-Backup
(add-to-list 'backup-directory-alist
(cons tramp-file-name-regexp nil))
(customize-set-variable 'tramp-backup-directory-alist backup-directory-alist)
(setq backup-enable-predicate
(lambda (name) nil)))
;; (use-package! ready-player
;; :config

View file

@ -39,6 +39,42 @@
(newline))
(setq message-signature nil))
(defun mu4e-view-save-all-attachments (&optional arg)
"Save all MIME parts from currsent mu4e gnus view buffer."
;; Copied from mu4e-view-save-attachments
(interactive "P")
(cl-assert (and (eq major-mode 'mu4e-view-mode)
(derived-mode-p 'gnus-article-mode)))
(let* ((msg (mu4e-message-at-point))
(id (cleanse-subject (mu4e-message-field msg :subject)))
(attachdir (concat bulk-saved-attachments-dir "/" id))
(parts (mu4e--view-gather-mime-parts))
(handles '())
(files '())
dir)
(mkdir attachdir t)
(dolist (part parts)
(let ((fname (or
(cdr (assoc 'filename (assoc "attachment" (cdr part))))
(seq-find #'stringp
(mapcar (lambda (item) (cdr (assoc 'name item)))
(seq-filter 'listp (cdr part)))))))
(when fname
(push `(,fname . ,(cdr part)) handles)
(push fname files))))
(if files
(progn
(setq dir
(if arg (read-directory-name "Save to directory: ")
attachdir))
(cl-loop for (f . h) in handles
when (member f files)
do (mm-save-part-to-file h
(sje-next-free
(expand-file-name f dir)))))
(mu4e-message "No attached files found"))))
(use-package! consult-mu
:defer-incrementally mu4e
:custom