diff options
| author | benj <benj@rse8.com> | 2026-03-09 21:31:13 +0800 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2026-03-09 21:31:13 +0800 |
| commit | b210f727622cb38287c7bc77b9a31cc8c95c43e3 (patch) | |
| tree | 26c8cad9edb77759f04d068dc382dbff51cef9a5 | |
| parent | 681e5d3e6f77da4d28b56a1d55374c7ef3cbb246 (diff) | |
| download | emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar.gz emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar.bz2 emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar.lz emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar.xz emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.tar.zst emacs-b210f727622cb38287c7bc77b9a31cc8c95c43e3.zip | |
add claude-code keybinding and email localhost redirect
Diffstat (limited to '')
| -rw-r--r-- | init.el | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -131,9 +131,7 @@ (use-package claude-code :ensure t - :after vterm - :config - ) + :init) (use-package cmake-mode :ensure t @@ -237,13 +235,15 @@ (use-package gptel :ensure t - :after (password-store aider) + :after (password-store aider claude-code) :bind (:prefix-map ai-commands :prefix-docstring "Emacs AI comamands" :prefix "C-c a" ("a" . 'gptel) + ("c" . 'claude-code-run) ("i" . 'aider-transient-menu) ("s" . 'gptel-menu) + ("q" . 'gptel-abort) ("RET" . 'gptel-send)) :custom (gptel-api-key (auth-source-pass-get 'secret "openai.com/api.openai.com/apikey")) @@ -348,7 +348,6 @@ (use-package mu4e :ensure nil :init - ;; Set global defaults dynamically before mu4e loads (let ((first-account (car (directory-files "~/.mail" nil "^[^.]")))) (when first-account (setq mu4e-sent-folder (concat "/" first-account "/Sent") @@ -369,6 +368,14 @@ message-sendmail-extra-arguments '("--read-envelope-from") message-sendmail-f-is-evil t) + (defun my/route-localhost-mail () + "Force msmtp to use smtp4dev if emailing a localhost address." + (let ((to-field (message-field-value "To"))) + (when (and to-field (string-match-p "@localhost" to-field)) + (setq-local message-sendmail-extra-arguments '("-a" "smtp4dev"))))) + + (add-hook 'message-send-hook 'my/route-localhost-mail) + (defvar my/mu4e-account-maildirs '((mu4e-drafts-folder . "Drafts") (mu4e-sent-folder . "Sent") @@ -386,10 +393,10 @@ (defun my/mu4e-discover-accounts () "Scan ~/.mail for directories and generate mu4e contexts." (let ((accounts (directory-files mu4e-maildir nil "^[^.]"))) - (mapcar - (lambda (account) + (seq-map-indexed + (lambda (account idx) (make-mu4e-context - :name account + :name (format "%d-%s" (1+ idx) account) :match-func (lambda (msg) (when msg @@ -587,6 +594,9 @@ (use-package projectile-ripgrep :ensure t) +(use-package protobuf-mode + :ensure t) + (use-package pyvenv :ensure t) |
