Compare commits

..

No commits in common. "293281eacab3fb73c7bbf5670b9e3ba971f36ed0" and "e560c498b460bf440a6c3a9f0ae5594acf9822a3" have entirely different histories.

23 changed files with 127 additions and 170 deletions

View File

@ -9,6 +9,7 @@
:init
(leader-def-key "P" '(nil :which-key "passwords"))
:config
(evil-collection-pass-setup)
(defun password-store-synchronize ()
(interactive)
(with-editor-async-shell-command "pass git pull && pass git push"))

View File

@ -3,12 +3,15 @@
;; Configuration for built-ins that don't fit anywhere else
(use-package custom
:straight (:type built-in)
:defer t)
:defer t
:config
(evil-collection-custom-setup))
(use-package view
:straight (:type built-in)
:defer t
:config
(evil-collection-view-setup)
(evil-collection-define-key 'normal 'view-mode-map
"0" 'evil-beginning-of-line
"g0" 'text-scale-adjust))
@ -36,6 +39,7 @@
:straight (:type built-in)
:config
(setq ediff-window-setup-function #'ediff-setup-windows-plain)
(evil-collection-ediff-setup)
;; Restore window configuration after an ediff session
(defvar ediff-last-windows nil)
@ -51,7 +55,9 @@
(use-package replace
:defer t
:straight (:type built-in))
:straight (:type built-in)
:config
(evil-collection-replace-setup))
(use-package hideshow
:straight (:type built-in)

View File

@ -43,6 +43,7 @@
(clojurescript-mode . cider-mode)
(clojurec-mode . cider-mode))
:config
(evil-collection-cider-setup)
(general-def cider-mode-map "C-c t" cider-test-commands-map)
(general-def normal cider--debug-mode-map "," cider--debug-mode-map)
:general

View File

@ -11,6 +11,7 @@
(when (file-exists-p pic)
(setq dashboard-startup-banner pic)))
(dashboard-setup-startup-hook)
(evil-collection-dashboard-setup)
:custom
(dashboard-items '((projects . 5) (recents . 5)))
(dashboard-set-heading-icons t)

View File

@ -19,8 +19,7 @@
display-buffer-alist '((".*"
(display-buffer-reuse-window display-buffer-same-window)
(reusable-frames . t)))
even-window-sizes nil
manual-program "gman")
even-window-sizes nil)
(setq-default indent-tabs-mode nil)
;; Always display line numbers in text/programming modes

View File

@ -12,6 +12,7 @@
(interactive)
(let ((default-directory (dired-current-directory)))
(call-interactively #'dired-do-rename)))
(evil-collection-dired-setup)
:general
(dired-mode-map [remap find-file] #'dired-find-file-current-dir
[remap dired-do-rename] #'dired-do-rename-current-dir

View File

@ -4,6 +4,8 @@
:mode (("Dockerfile\\'" . dockerfile-mode)))
(use-package docker
:commands (docker))
:commands (docker)
:config
(evil-collection-docker-setup))
(provide 'init-docker)

View File

@ -3,6 +3,7 @@
(use-package elfeed
:commands elfeed
:config
(evil-collection-elfeed-setup)
(setq elfeed-search-filter "@6-months-ago +unread -hacker-news")
(setq elfeed-feeds
(list (list (password-store-get "freshrss-blog-feed-url") 'blog)

View File

@ -1,13 +1,14 @@
;; Email in Emacs via mu4e
(use-package mu4e
:straight (:host github :repo "djcb/mu" :files ("mu4e/*"))
;; mu4e is not actually built-in, but it is installed outside of normal Emacs package management
:straight (:type built-in)
:if (locate-library "mu4e")
:commands (mu4e mu4e-update-mail-and-index)
:hook (after-init . (lambda () (mu4e t)))
:general
(normal mu4e-headers-mode-map "t" #'mu4e-headers-mark-thread)
(normal mu4e-view-mode-map "t" #'mu4e-view-mark-thread)
:config
(evil-collection-mu4e-setup)
(setq
;; General
mu4e-maildir (expand-file-name "~/.mail")
@ -25,17 +26,17 @@
("View in browser" . mu4e-action-view-in-browser))
;; Bookmarked searches
mu4e-bookmarks '((:name "Inbox"
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jdormitzer-spotify-com/Inbox"
:key ?i)
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jdormitzer-spotify-com/Inbox"
:key ?i)
(:name "Unread messages"
:query "flag:unread AND NOT flag:trashed"
:key ?u)
:query "flag:unread AND NOT flag:trashed"
:key ?u)
(:name "Today's messages"
:query "date:today..now"
:key ?t)
:query "date:today..now"
:key ?t)
(:name "Last 7 days"
:query "date:7d..now"
:key ?p))
:query "date:7d..now"
:key ?p))
;; Getting mail
mu4e-get-mail-command "mbsync -a"
;; Sending mail
@ -49,31 +50,16 @@
;; HTML email rendering
shr-use-colors nil
;; Make sure mu4e knows about my different accounts
mu4e-context-policy 'pick-first
mu4e-context-policy 'ask
mu4e-compose-context-policy 'ask
mu4e-contexts
`(,(make-mu4e-context
:name "Spotify Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p
"jdormitzer-spotify-com"
(mu4e-message-field msg :path))))
:vars '((user-mail-address . "jdormitzer@spotify.com")
(mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jdormitzer-spotify-com/Sent")
(mu4e-drafts-folder . "/jdormitzer-spotify-com/Drafts")
(mu4e-refile-folder . "/jdormitzer-spotify-com/Archive")
(mu4e-trash-folder . "/jdormitzer-spotify-com/Trash")
(message-sendmail-extra-arguments
. ("-a" "jdormitzer-spotify-com"))))
,(make-mu4e-context
:name "Personal Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p
"jeremy-dormitzer-gmail-com"
(mu4e-message-field msg :path))))
(string-match-p
"jeremy-dormitzer-gmail-com"
(mu4e-message-field msg :path))))
:vars '((user-mail-address . "jeremy.dormitzer@gmail.com")
(mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jeremy-dormitzer-gmail-com/Sent")
@ -81,7 +67,22 @@
(mu4e-refile-folder . "/jeremy-dormitzer-gmail-com/Archive")
(mu4e-trash-folder . "/jeremy-dormitzer-gmail-com/Trash")
(message-sendmail-extra-arguments
. ("-a" "jeremy-dormitzer-gmail-com"))))))
. ("-a" "jeremy-dormitzer-gmail-com"))))
,(make-mu4e-context
:name "Spotify Gmail"
:match-func (lambda (msg)
(when msg
(string-match-p
"jdormitzer-spotify-com"
(mu4e-message-field msg :path))))
:vars '((user-mail-address . "jdormitzer@spotify.com")
(mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jdormitzer-spotify-com/Sent")
(mu4e-drafts-folder . "/jdormitzer-spotify-com/Drafts")
(mu4e-refile-folder . "/jdormitzer-spotify-com/Archive")
(mu4e-trash-folder . "/jdormitzer-spotify-com/Trash")
(message-sendmail-extra-arguments
. ("-a" "jdormitzer-spotify-com"))))))
;; Custom mark function to mark messages matching the current message
(defun mu4e-mark-matching-from-pred (msg from)
(mu4e-message-contact-field-matches msg :from from))
@ -109,7 +110,7 @@
(lambda
(msg date)
(time-less-p date
(mu4e-msg-field msg :date)))
(mu4e-msg-field msg :date)))
(lambda nil
(mu4e-get-time-date "Match messages after: ")))
("Bigger than"
@ -242,13 +243,13 @@ string."
(if (not (equal (assoc-mml-node 'type node) "text/plain"))
acc
`(part (type . "text/plain")
(contents . ,(concat (cdaddr acc)
(cdaddr node))))))
(contents . ,(concat (cdaddr acc)
(cdaddr node))))))
parsed
:initial-value '(part (type . "text/plain")
(contents . ""))))
(contents . ""))))
(html `(part (type . "text/html")
(contents . ,(gfm->html (cdaddr plain)))))
(contents . ,(gfm->html (cdaddr plain)))))
(inline (nreverse
(cl-reduce
(lambda (acc node)

View File

@ -1,7 +1,9 @@
;; -*- lexical-binding: t; -*-
(use-package nov
:mode (("\\.epub\\'" . nov-mode)))
:mode (("\\.epub\\'" . nov-mode))
:config
(evil-collection-nov-setup))
(defvar ebook-library
(expand-file-name "~/Sync/Calibre Library")

View File

@ -21,6 +21,8 @@
(add-hook 'eshell-mode-hook
(lambda () (general-def eshell-mode-map "C-c C-o" #'clear-eshell)))
(evil-collection-eshell-setup)
;; Gotta have a good prompt
(defun jdormit-eshell-prompt ()
(let ((branch (magit-name-local-branch "HEAD")))

View File

@ -10,46 +10,12 @@
(evil-define-key 'motion 'global
"j" #'evil-next-visual-line
"k" #'evil-previous-visual-line)
(defun my-evil-lookup-func ()
"Context-aware `evil-lookup-func'"
(cond
((and (eq major-mode 'emacs-lisp-mode)
(thing-at-point 'symbol))
(helpful-symbol (intern (thing-at-point 'symbol))))
((eldoc--supported-p) (eldoc t))
((thing-at-point 'word) (consult-man (thing-at-point 'word t)))))
:custom
(evil-lookup-func #'my-evil-lookup-func)
(evil-undo-system 'undo-fu)
(evil-split-window-below t)
(evil-vsplit-window-right t))
(use-package evil-collection
:straight (:host github :repo "meliache/evil-collection" :branch "mu4e-development")
:after evil
:config
(evil-collection-init '(dashboard
vterm
nov
info
magit
forge
dired
custom
view
ediff
replace
pdf
ripgrep
xref
compile
realgud
mu4e
cider
elfeed
pass
eshell
prodigy
docker)))
:after evil)
(provide 'init-evil)

View File

@ -9,6 +9,7 @@
:init
(leader-def-key "g" '(nil :which-key "git"))
:config
(evil-collection-magit-setup)
(add-hook 'magit-mode-hook #'hl-line-mode)
:general
(leader-map "gs" #'magit-status
@ -55,6 +56,7 @@
:demand t
:config
(setq forge-add-default-bindings nil)
(evil-collection-forge-setup)
(add-to-list 'forge-alist '("git.jeremydormitzer.com"
"git.jeremydormitzer.com/api/v1"
"git.jeremydormitzer.com"

View File

@ -5,7 +5,9 @@
(leader-def-key "h" '(:keymap help-map :which-key "help"))
(use-package info
:straight (:type built-in))
:straight (:type built-in)
:config
(evil-collection-info-setup))
(use-package helpful
:general

View File

@ -4,10 +4,8 @@
;; Corfu-mode provides inline autocompletion
(use-package corfu
:straight (:files (:defaults "extensions/corfu-echo.el"))
:init
(global-corfu-mode)
(corfu-echo-mode)
:config
(defun corfu-move-to-minibuffer ()
(interactive)
@ -24,9 +22,7 @@
(add-hook 'minibuffer-setup-hook #'corfu-enable-in-minibuffer)
:general
(corfu-map "S-SPC" #'corfu-insert-separator
"M-m" #'corfu-move-to-minibuffer)
:custom-face
(corfu-echo ((t :inherit default))))
"M-m" #'corfu-move-to-minibuffer))
;; Quick file overview for supported modes
(use-package imenu
@ -37,6 +33,8 @@
;; Find definition/references
(use-package xref
:straight (:type built-in)
:config
(evil-collection-xref-setup)
:general
(normal "M-," #'xref-pop-marker-stack)
(normal "M-r" #'xref-find-references)
@ -174,6 +172,7 @@
:straight (:type built-in)
:commands compile
:config
(evil-collection-compile-setup)
(defun postprocess-compilation-buffer ()
(goto-char compilation-filter-start)
(when (looking-at "\033c")
@ -191,5 +190,6 @@
(use-package realgud
:defer t
:config
(evil-collection-realgud-setup))
(provide 'init-ide)

View File

@ -2,29 +2,18 @@
(use-package org
:straight '(org-plus-contrib :type git
:repo "https://git.sr.ht/~bzg/org-contrib")
:repo "https://git.sr.ht/~bzg/org-contrib")
:mode (("\\.org\\'" . org-mode))
:init
(leader-def-key "o" '(nil :which-key "org"))
:config
(add-hook 'org-mode-hook #'auto-fill-mode)
(add-hook 'org-mode-hook (lambda () (require 'org-attach)))
(defun org-find-daily-note ()
(interactive)
(let* ((filename (expand-file-name
(format "~/org/daily/%s.org"
(format-time-string "%Y-%m-%d"))))
(file-exists (file-exists-p filename)))
(find-file filename)
(goto-char (point-min))
(unless file-exists
(insert (format "* %s daily note"
(format-time-string "%Y-%m-%d")))
(newline))
(goto-char (point-max))))
:custom
(org-agenda-files `(,(expand-file-name "~/org/todo.org")
,(expand-file-name "~/org/daily")))
,(expand-file-name "~/org/lola-gcal.org")
,(expand-file-name "~/org/personal-gcal.org")
,(expand-file-name "~/org/j-n-gcal.org")))
(org-todo-keywords '((sequence
"TODO(t)"
"IN PROGRESS(i)"
@ -32,10 +21,7 @@
"|"
"DONE(d)"
"CANCELLED(c)")))
(org-capture-templates `(("d" "Daily note" plain
(function org-find-daily-note)
"* %<%I:%M %p>")
("s" "Spotify task" entry
(org-capture-templates `(("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
"* TODO %i%?")
("p" "Personal task" entry
@ -61,7 +47,6 @@
(leader-map "oa" #'org-agenda)
(leader-map "oc" #'org-capture)
(leader-map "ol" #'org-store-link)
(leader-map "od" #'org-find-daily-note)
(normal org-mode-map "<return>" #'org-return)
(normal org-mode-map "T" #'org-insert-todo-heading))
@ -81,59 +66,57 @@
(setq org-super-agenda-header-map (make-sparse-keymap))
:custom
(org-super-agenda-groups `((:name "In progress"
:todo "IN PROGRESS")
(:name "Daily"
:file-path ,(expand-file-name "~/org/daily"))
:todo "IN PROGRESS")
(:name "Spotify"
:tag "@spotify")
:tag "@spotify")
(:name "Lola"
:tag "@lola")
:tag "@lola")
(:name "unifyDB"
:tag "@unifydb")
:tag "@unifydb")
(:name "Personal"
:tag "@personal")
:tag "@personal")
(:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
;; (use-package org-gcal
;; :commands (org-gcal-sync
;; org-gcal-fetch
;; org-gcal-post-at-point
;; org-gcal-delete-at-point
;; org-gcal-request-token)
;; :after (org evil-org)
;; :init
;; (defun org-agenda-redo-and-fetch-gcal (&optional all)
;; (interactive "P")
;; (let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
;; (deferred:nextc (org-gcal-fetch) cb)))
;; (advice-add 'evil-org-agenda-set-keys :after
;; (lambda ()
;; (general-def 'motion org-agenda-mode-map
;; "gR" #'org-agenda-redo-and-fetch-gcal)))
;; :config
;; (setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id")
;; org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
;; org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
;; ,(expand-file-name "~/org/lola-gcal.org"))
;; ("jeremy.dormitzer@gmail.com" .
;; ,(expand-file-name "~/org/personal-gcal.org"))
;; ("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
;; ,(expand-file-name "~/org/j-n-gcal.org")))
;; org-gcal-notify-p nil))
(use-package org-gcal
:commands (org-gcal-sync
org-gcal-fetch
org-gcal-post-at-point
org-gcal-delete-at-point
org-gcal-request-token)
:after (org evil-org)
:init
(defun org-agenda-redo-and-fetch-gcal (&optional all)
(interactive "P")
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
(deferred:nextc (org-gcal-fetch) cb)))
(advice-add 'evil-org-agenda-set-keys :after
(lambda ()
(general-def 'motion org-agenda-mode-map
"gR" #'org-agenda-redo-and-fetch-gcal)))
:config
(setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id")
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
,(expand-file-name "~/org/lola-gcal.org"))
("jeremy.dormitzer@gmail.com" .
,(expand-file-name "~/org/personal-gcal.org"))
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
,(expand-file-name "~/org/j-n-gcal.org")))
org-gcal-notify-p nil))
;; (use-package org-jira
;; :after (org)
;; :init
;; (setq jiralib-url "https://lola.atlassian.net"
;; org-jira-working-dir (expand-file-name "~/org/jira")
;; org-jira-jira-status-to-org-keyword-alist '(("To Do" . "TODO")
;; ("Blocked" . "BLOCKED")
;; ("In Progress" . "IN PROGRESS")
;; ("Code Review" . "IN PROGRESS")
;; ("Awaiting Release" . "IN PROGRESS")
;; ("Done" . "DONE")
;; ("Won't Fix" . "CANCELLED")))
;; (add-to-list 'org-agenda-files org-jira-working-dir))
(use-package org-jira
:after (org)
:init
(setq jiralib-url "https://lola.atlassian.net"
org-jira-working-dir (expand-file-name "~/org/jira")
org-jira-jira-status-to-org-keyword-alist '(("To Do" . "TODO")
("Blocked" . "BLOCKED")
("In Progress" . "IN PROGRESS")
("Code Review" . "IN PROGRESS")
("Awaiting Release" . "IN PROGRESS")
("Done" . "DONE")
("Won't Fix" . "CANCELLED")))
(add-to-list 'org-agenda-files org-jira-working-dir))
;; org-roam provides backlinks between org documents
(use-package org-roam

View File

@ -3,6 +3,7 @@
(use-package pdf-tools
:mode (("\\.pdf\\'" . pdf-view-mode))
:config
(pdf-tools-install))
(pdf-tools-install)
(evil-collection-pdf-setup))
(provide 'init-pdf)

View File

@ -8,6 +8,8 @@
('normal prodigy-mode-map "SPC" leader-map)
('normal prodigy-view-mode-map "SPC" leader-map)
:custom
(prodigy-completion-system 'default))
(prodigy-completion-system 'default)
:config
(evil-collection-prodigy-setup))
(provide 'init-prodigy)

View File

@ -9,6 +9,8 @@
;; Ripgrep integration
(use-package projectile-ripgrep
:after projectile)
:after projectile
:config
(evil-collection-ripgrep-setup))
(provide 'init-projects)

View File

@ -9,6 +9,7 @@
(call-interactively #'projectile-run-vterm)
(call-interactively #'vterm)))
:config
(evil-collection-vterm-setup)
(general-def 'insert vterm-mode-map "C-<escape>" #'vterm-send-escape)
;; Add a hook when vterm changes the directory
(defvar vterm-directory-change-hook nil

View File

@ -18,7 +18,6 @@ brew "jdtls"
brew "jq"
brew "kubectx"
brew "llvm"
brew "man-db"
brew "maven"
brew "metals"
brew "msmtp"

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Applice//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.jdormit.mandb</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/mandb</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>

View File

@ -115,10 +115,6 @@ alias kns="kubens"
alias kctx="kubectx"
alias tf="terraform"
if type gman &>/dev/null; then
alias man="gman"
fi
# zsh-completions homebrew package
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH