Compare commits

..

6 Commits

23 changed files with 170 additions and 127 deletions

View File

@ -9,7 +9,6 @@
: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,15 +3,12 @@
;; Configuration for built-ins that don't fit anywhere else
(use-package custom
:straight (:type built-in)
:defer t
:config
(evil-collection-custom-setup))
:defer t)
(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))
@ -39,7 +36,6 @@
: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)
@ -55,9 +51,7 @@
(use-package replace
:defer t
:straight (:type built-in)
:config
(evil-collection-replace-setup))
:straight (:type built-in))
(use-package hideshow
:straight (:type built-in)

View File

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

View File

@ -12,7 +12,6 @@
(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,8 +4,6 @@
:mode (("Dockerfile\\'" . dockerfile-mode)))
(use-package docker
:commands (docker)
:config
(evil-collection-docker-setup))
:commands (docker))
(provide 'init-docker)

View File

@ -3,7 +3,6 @@
(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,14 +1,13 @@
;; Email in Emacs via mu4e
(use-package mu4e
;; mu4e is not actually built-in, but it is installed outside of normal Emacs package management
:straight (:type built-in)
:straight (:host github :repo "djcb/mu" :files ("mu4e/*"))
: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")
@ -50,25 +49,10 @@
;; HTML email rendering
shr-use-colors nil
;; Make sure mu4e knows about my different accounts
mu4e-context-policy 'ask
mu4e-context-policy 'pick-first
mu4e-compose-context-policy 'ask
mu4e-contexts
`(,(make-mu4e-context
:name "Personal Gmail"
:match-func (lambda (msg)
(when msg
(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")
(mu4e-drafts-folder . "/jeremy-dormitzer-gmail-com/Drafts")
(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"))))
,(make-mu4e-context
:name "Spotify Gmail"
:match-func (lambda (msg)
(when msg
@ -82,7 +66,22 @@
(mu4e-refile-folder . "/jdormitzer-spotify-com/Archive")
(mu4e-trash-folder . "/jdormitzer-spotify-com/Trash")
(message-sendmail-extra-arguments
. ("-a" "jdormitzer-spotify-com"))))))
. ("-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))))
:vars '((user-mail-address . "jeremy.dormitzer@gmail.com")
(mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jeremy-dormitzer-gmail-com/Sent")
(mu4e-drafts-folder . "/jeremy-dormitzer-gmail-com/Drafts")
(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"))))))
;; 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))

View File

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

View File

@ -21,8 +21,6 @@
(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,12 +10,46 @@
(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
:after evil)
: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)))
(provide 'init-evil)

View File

@ -9,7 +9,6 @@
: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
@ -56,7 +55,6 @@
: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,9 +5,7 @@
(leader-def-key "h" '(:keymap help-map :which-key "help"))
(use-package info
:straight (:type built-in)
:config
(evil-collection-info-setup))
:straight (:type built-in))
(use-package helpful
:general

View File

@ -4,8 +4,10 @@
;; 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)
@ -22,7 +24,9 @@
(add-hook 'minibuffer-setup-hook #'corfu-enable-in-minibuffer)
:general
(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
(use-package imenu
@ -33,8 +37,6 @@
;; 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)
@ -172,7 +174,6 @@
:straight (:type built-in)
:commands compile
:config
(evil-collection-compile-setup)
(defun postprocess-compilation-buffer ()
(goto-char compilation-filter-start)
(when (looking-at "\033c")
@ -190,6 +191,5 @@
(use-package realgud
:defer t
:config
(evil-collection-realgud-setup))
(provide 'init-ide)

View File

@ -9,11 +9,22 @@
: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/lola-gcal.org")
,(expand-file-name "~/org/personal-gcal.org")
,(expand-file-name "~/org/j-n-gcal.org")))
,(expand-file-name "~/org/daily")))
(org-todo-keywords '((sequence
"TODO(t)"
"IN PROGRESS(i)"
@ -21,7 +32,10 @@
"|"
"DONE(d)"
"CANCELLED(c)")))
(org-capture-templates `(("s" "Spotify task" entry
(org-capture-templates `(("d" "Daily note" plain
(function org-find-daily-note)
"* %<%I:%M %p>")
("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
"* TODO %i%?")
("p" "Personal task" entry
@ -47,6 +61,7 @@
(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))
@ -67,6 +82,8 @@
:custom
(org-super-agenda-groups `((:name "In progress"
:todo "IN PROGRESS")
(:name "Daily"
:file-path ,(expand-file-name "~/org/daily"))
(:name "Spotify"
:tag "@spotify")
(:name "Lola"
@ -77,46 +94,46 @@
: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,7 +3,6 @@
(use-package pdf-tools
:mode (("\\.pdf\\'" . pdf-view-mode))
:config
(pdf-tools-install)
(evil-collection-pdf-setup))
(pdf-tools-install))
(provide 'init-pdf)

View File

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

View File

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

View File

@ -9,7 +9,6 @@
(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,6 +18,7 @@ brew "jdtls"
brew "jq"
brew "kubectx"
brew "llvm"
brew "man-db"
brew "maven"
brew "metals"
brew "msmtp"

View File

@ -0,0 +1,14 @@
<?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,6 +115,10 @@ 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