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 :init
(leader-def-key "P" '(nil :which-key "passwords")) (leader-def-key "P" '(nil :which-key "passwords"))
:config :config
(evil-collection-pass-setup)
(defun password-store-synchronize () (defun password-store-synchronize ()
(interactive) (interactive)
(with-editor-async-shell-command "pass git pull && pass git push")) (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 ;; Configuration for built-ins that don't fit anywhere else
(use-package custom (use-package custom
:straight (:type built-in) :straight (:type built-in)
:defer t) :defer t
:config
(evil-collection-custom-setup))
(use-package view (use-package view
:straight (:type built-in) :straight (:type built-in)
:defer t :defer t
:config :config
(evil-collection-view-setup)
(evil-collection-define-key 'normal 'view-mode-map (evil-collection-define-key 'normal 'view-mode-map
"0" 'evil-beginning-of-line "0" 'evil-beginning-of-line
"g0" 'text-scale-adjust)) "g0" 'text-scale-adjust))
@ -36,6 +39,7 @@
:straight (:type built-in) :straight (:type built-in)
:config :config
(setq ediff-window-setup-function #'ediff-setup-windows-plain) (setq ediff-window-setup-function #'ediff-setup-windows-plain)
(evil-collection-ediff-setup)
;; Restore window configuration after an ediff session ;; Restore window configuration after an ediff session
(defvar ediff-last-windows nil) (defvar ediff-last-windows nil)
@ -51,7 +55,9 @@
(use-package replace (use-package replace
:defer t :defer t
:straight (:type built-in)) :straight (:type built-in)
:config
(evil-collection-replace-setup))
(use-package hideshow (use-package hideshow
:straight (:type built-in) :straight (:type built-in)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,13 +1,14 @@
;; Email in Emacs via mu4e ;; Email in Emacs via mu4e
(use-package 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") :if (locate-library "mu4e")
:commands (mu4e mu4e-update-mail-and-index) :commands (mu4e mu4e-update-mail-and-index)
:hook (after-init . (lambda () (mu4e t)))
:general :general
(normal mu4e-headers-mode-map "t" #'mu4e-headers-mark-thread) (normal mu4e-headers-mode-map "t" #'mu4e-headers-mark-thread)
(normal mu4e-view-mode-map "t" #'mu4e-view-mark-thread) (normal mu4e-view-mode-map "t" #'mu4e-view-mark-thread)
:config :config
(evil-collection-mu4e-setup)
(setq (setq
;; General ;; General
mu4e-maildir (expand-file-name "~/.mail") mu4e-maildir (expand-file-name "~/.mail")
@ -49,25 +50,10 @@
;; HTML email rendering ;; HTML email rendering
shr-use-colors nil shr-use-colors nil
;; Make sure mu4e knows about my different accounts ;; Make sure mu4e knows about my different accounts
mu4e-context-policy 'pick-first mu4e-context-policy 'ask
mu4e-compose-context-policy 'ask mu4e-compose-context-policy 'ask
mu4e-contexts mu4e-contexts
`(,(make-mu4e-context `(,(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" :name "Personal Gmail"
:match-func (lambda (msg) :match-func (lambda (msg)
(when msg (when msg
@ -81,7 +67,22 @@
(mu4e-refile-folder . "/jeremy-dormitzer-gmail-com/Archive") (mu4e-refile-folder . "/jeremy-dormitzer-gmail-com/Archive")
(mu4e-trash-folder . "/jeremy-dormitzer-gmail-com/Trash") (mu4e-trash-folder . "/jeremy-dormitzer-gmail-com/Trash")
(message-sendmail-extra-arguments (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 ;; Custom mark function to mark messages matching the current message
(defun mu4e-mark-matching-from-pred (msg from) (defun mu4e-mark-matching-from-pred (msg from)
(mu4e-message-contact-field-matches msg :from from)) (mu4e-message-contact-field-matches msg :from from))

View File

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

View File

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

View File

@ -10,46 +10,12 @@
(evil-define-key 'motion 'global (evil-define-key 'motion 'global
"j" #'evil-next-visual-line "j" #'evil-next-visual-line
"k" #'evil-previous-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 :custom
(evil-lookup-func #'my-evil-lookup-func)
(evil-undo-system 'undo-fu) (evil-undo-system 'undo-fu)
(evil-split-window-below t) (evil-split-window-below t)
(evil-vsplit-window-right t)) (evil-vsplit-window-right t))
(use-package evil-collection (use-package evil-collection
:straight (:host github :repo "meliache/evil-collection" :branch "mu4e-development") :after evil)
: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)))
(provide 'init-evil) (provide 'init-evil)

View File

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

View File

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

View File

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

View File

@ -9,22 +9,11 @@
:config :config
(add-hook 'org-mode-hook #'auto-fill-mode) (add-hook 'org-mode-hook #'auto-fill-mode)
(add-hook 'org-mode-hook (lambda () (require 'org-attach))) (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 :custom
(org-agenda-files `(,(expand-file-name "~/org/todo.org") (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 (org-todo-keywords '((sequence
"TODO(t)" "TODO(t)"
"IN PROGRESS(i)" "IN PROGRESS(i)"
@ -32,10 +21,7 @@
"|" "|"
"DONE(d)" "DONE(d)"
"CANCELLED(c)"))) "CANCELLED(c)")))
(org-capture-templates `(("d" "Daily note" plain (org-capture-templates `(("s" "Spotify task" entry
(function org-find-daily-note)
"* %<%I:%M %p>")
("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify") (file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
"* TODO %i%?") "* TODO %i%?")
("p" "Personal task" entry ("p" "Personal task" entry
@ -61,7 +47,6 @@
(leader-map "oa" #'org-agenda) (leader-map "oa" #'org-agenda)
(leader-map "oc" #'org-capture) (leader-map "oc" #'org-capture)
(leader-map "ol" #'org-store-link) (leader-map "ol" #'org-store-link)
(leader-map "od" #'org-find-daily-note)
(normal org-mode-map "<return>" #'org-return) (normal org-mode-map "<return>" #'org-return)
(normal org-mode-map "T" #'org-insert-todo-heading)) (normal org-mode-map "T" #'org-insert-todo-heading))
@ -82,8 +67,6 @@
:custom :custom
(org-super-agenda-groups `((:name "In progress" (org-super-agenda-groups `((:name "In progress"
:todo "IN PROGRESS") :todo "IN PROGRESS")
(:name "Daily"
:file-path ,(expand-file-name "~/org/daily"))
(:name "Spotify" (:name "Spotify"
:tag "@spotify") :tag "@spotify")
(:name "Lola" (:name "Lola"
@ -94,46 +77,46 @@
:tag "@personal") :tag "@personal")
(:name "Jira" :file-path ,(expand-file-name "~/org/jira"))))) (:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
;; (use-package org-gcal (use-package org-gcal
;; :commands (org-gcal-sync :commands (org-gcal-sync
;; org-gcal-fetch org-gcal-fetch
;; org-gcal-post-at-point org-gcal-post-at-point
;; org-gcal-delete-at-point org-gcal-delete-at-point
;; org-gcal-request-token) org-gcal-request-token)
;; :after (org evil-org) :after (org evil-org)
;; :init :init
;; (defun org-agenda-redo-and-fetch-gcal (&optional all) (defun org-agenda-redo-and-fetch-gcal (&optional all)
;; (interactive "P") (interactive "P")
;; (let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo))) (let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
;; (deferred:nextc (org-gcal-fetch) cb))) (deferred:nextc (org-gcal-fetch) cb)))
;; (advice-add 'evil-org-agenda-set-keys :after (advice-add 'evil-org-agenda-set-keys :after
;; (lambda () (lambda ()
;; (general-def 'motion org-agenda-mode-map (general-def 'motion org-agenda-mode-map
;; "gR" #'org-agenda-redo-and-fetch-gcal))) "gR" #'org-agenda-redo-and-fetch-gcal)))
;; :config :config
;; (setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id") (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-client-secret (password-store-get "lola-org-gcal-client-secret")
;; org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" . org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
;; ,(expand-file-name "~/org/lola-gcal.org")) ,(expand-file-name "~/org/lola-gcal.org"))
;; ("jeremy.dormitzer@gmail.com" . ("jeremy.dormitzer@gmail.com" .
;; ,(expand-file-name "~/org/personal-gcal.org")) ,(expand-file-name "~/org/personal-gcal.org"))
;; ("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" . ("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
;; ,(expand-file-name "~/org/j-n-gcal.org"))) ,(expand-file-name "~/org/j-n-gcal.org")))
;; org-gcal-notify-p nil)) org-gcal-notify-p nil))
;; (use-package org-jira (use-package org-jira
;; :after (org) :after (org)
;; :init :init
;; (setq jiralib-url "https://lola.atlassian.net" (setq jiralib-url "https://lola.atlassian.net"
;; org-jira-working-dir (expand-file-name "~/org/jira") org-jira-working-dir (expand-file-name "~/org/jira")
;; org-jira-jira-status-to-org-keyword-alist '(("To Do" . "TODO") org-jira-jira-status-to-org-keyword-alist '(("To Do" . "TODO")
;; ("Blocked" . "BLOCKED") ("Blocked" . "BLOCKED")
;; ("In Progress" . "IN PROGRESS") ("In Progress" . "IN PROGRESS")
;; ("Code Review" . "IN PROGRESS") ("Code Review" . "IN PROGRESS")
;; ("Awaiting Release" . "IN PROGRESS") ("Awaiting Release" . "IN PROGRESS")
;; ("Done" . "DONE") ("Done" . "DONE")
;; ("Won't Fix" . "CANCELLED"))) ("Won't Fix" . "CANCELLED")))
;; (add-to-list 'org-agenda-files org-jira-working-dir)) (add-to-list 'org-agenda-files org-jira-working-dir))
;; org-roam provides backlinks between org documents ;; org-roam provides backlinks between org documents
(use-package org-roam (use-package org-roam

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,6 @@ brew "jdtls"
brew "jq" brew "jq"
brew "kubectx" brew "kubectx"
brew "llvm" brew "llvm"
brew "man-db"
brew "maven" brew "maven"
brew "metals" brew "metals"
brew "msmtp" 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 kctx="kubectx"
alias tf="terraform" alias tf="terraform"
if type gman &>/dev/null; then
alias man="gman"
fi
# zsh-completions homebrew package # zsh-completions homebrew package
if type brew &>/dev/null; then if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH FPATH=$(brew --prefix)/share/zsh-completions:$FPATH