From 608cc0e3bab45d0c303191fb326179d463333fad Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 17 Mar 2025 16:35:00 -0400 Subject: move mbsyncrc to ~/.config/isyncrc --- .chezmoiremove | 1 + dot_config/isyncrc.tmpl | 219 ++++++++++++++++++++++++++++++++++++++++++++++++ dot_mbsyncrc.tmpl | 219 ------------------------------------------------ 3 files changed, 220 insertions(+), 219 deletions(-) create mode 100644 dot_config/isyncrc.tmpl delete mode 100644 dot_mbsyncrc.tmpl diff --git a/.chezmoiremove b/.chezmoiremove index fd1ff69..ff30391 100644 --- a/.chezmoiremove +++ b/.chezmoiremove @@ -10,6 +10,7 @@ bin/mutt .config/systemd/user/borgmatic@tosh.service.wants/backup-email@mail.cs.mcgill.ca.service .config/systemd/user/default.target.wants/swaybg-random.service .config/neomutt/news.rc +.mbsyncrc .xkb afs diff --git a/dot_config/isyncrc.tmpl b/dot_config/isyncrc.tmpl new file mode 100644 index 0000000..1bfd928 --- /dev/null +++ b/dot_config/isyncrc.tmpl @@ -0,0 +1,219 @@ +IMAPAccount UQAM +Host outlook.office365.com +User kavanagh.ryan@uqam.ca +PassCmd "mutt_oauth2.py --encryption-pipe='cat' --decryption-pipe='cat' $XDG_STATE_HOME/xoauth2-tokens/kavanagh.ryan.uqam.ca" +AuthMechs XOAUTH2 +TLSType IMAPS + +IMAPAccount queensu +Host outlook.office365.com +User 9rak@queensu.ca +PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" --client-secret="TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82" --encryption-pipe="cat" --decryption-pipe="cat" $XDG_STATE_HOME/xoauth2-tokens/9rak.queensu.ca" +AuthMechs XOAUTH2 +TLSType IMAPS + +IMAPAccount mcgill +Host outlook.office365.com +User ryan.kavanagh@mail.mcgill.ca +PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" --client-secret="TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82" --encryption-pipe="cat" --decryption-pipe="cat" $XDG_STATE_HOME/xoauth2-tokens/ryan.kavanagh.mail.mcgill.ca" +AuthMechs XOAUTH2 +TLSType IMAPS + +IMAPAccount CMU +Host imap.gmail.com +User rkavanag@alumni.cmu.edu +Pass {{ .password.cmu }} +AuthMechs PLAIN +TLSType IMAPS + +IMAPAccount gmail +Host imap.gmail.com +User ryanakca@gmail.com +Pass {{ .password.gmail }} +AuthMechs PLAIN +TLSType IMAPS + +IMAPAccount ryan.a.kavanagh.gmail.com +Host imap.gmail.com +User ryan.a.kavanagh@gmail.com +PassCmd "~/bin/mutt_oauth2.py --encryption-pipe=cat --decryption-pipe=cat $XDG_STATE_HOME/xoauth2-tokens/ryan.a.kavanagh.gmail.com" +AuthMechs XOAUTH2 +TLSType IMAPS + +IMAPAccount rak +Host hades.rak.ac +User rak +Pass {{ .password.rakac }} +AuthMechs PLAIN +TLSType IMAPS + +IMAPStore uqam-remote +Account UQAM + +IMAPStore queensu-remote +Account queensu + +IMAPStore mcgill-remote +Account mcgill + +IMAPStore cmu-remote +Account CMU + +IMAPStore rak-remote +Account rak + +IMAPStore gmail-remote +Account gmail + +IMAPStore ryan.a.kavanagh.gmail.com +Account ryan.a.kavanagh.gmail.com + +MaildirStore uqam-maildir +Subfolders Verbatim +Path ~/Maildir/UQAM/ +Inbox ~/Maildir/UQAM/INBOX + +MaildirStore cmu-maildir +Subfolders Verbatim +Path ~/Maildir/CMU/ +Inbox ~/Maildir/CMU/INBOX + +MaildirStore rak-maildir +Subfolders Verbatim +Path ~/Maildir/rak/ +Inbox ~/Maildir/rak/INBOX + +MaildirStore queensu-maildir +Subfolders Verbatim +Path ~/Maildir/queensu/ +Inbox ~/Maildir/queensu/INBOX + +MaildirStore mcgill-maildir +Subfolders Verbatim +Path ~/Maildir/mcgill/ +Inbox ~/Maildir/mcgill/INBOX + +MaildirStore gmail-maildir +Subfolders Verbatim +Path ~/Maildir/gmail/ +Inbox ~/Maildir/gmail/INBOX + +MaildirStore archive +Subfolders Verbatim +Path ~/Maildir/Archive/ +Inbox ~/Maildir/Archive/INBOX + +Channel uqam-inbox +Far :uqam-remote: +Near :uqam-maildir: +Create Both +Patterns INBOX +Expunge Near +Sync All + +Channel uqam-others +Far :uqam-remote: +Near :uqam-maildir: +Create Both +Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox !Probl* +Expunge Near +Sync All + +Channel queensu +Far :queensu-remote: +Near :queensu-maildir: +Create Both +Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox +Expunge Both +Remove Both +Sync All + +Channel mcgill +Far :mcgill-remote: +Near :mcgill-maildir: +Create Near +Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox +Expunge Near +Sync Pull + +Channel cmu +Far :cmu-remote: +Near :cmu-maildir: +Create Both +Expunge Near +Patterns * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Starred" !"[Gmail]/Bin" +Sync All + +Channel rak-inbox +Far :rak-remote: +Near :rak-maildir: +Create Both +Expunge Near +Patterns INBOX +Sync All + +Channel rak-lists +Far :rak-remote: +Near :rak-maildir: +Create Both +Expunge Near +Patterns Lists/* +Sync All + +Channel rak-misc +Far :rak-remote: +Near :rak-maildir: +Create Both +Expunge Near +Patterns * !Archive !Virtual !Virtual/* !INBOX !Lists !Lists/* +Sync All + +Channel rak-archive +Far :rak-remote: +Near :rak-maildir: +Create Both +Expunge Near +Patterns Archive +Sync All + +Group rak +Channel rak-inbox +Channel rak-lists +Channel rak-misc + +Channel gmail-inbox +Far :gmail-remote: +Near :gmail-maildir: +Create Near +Expunge Near +Pattern INBOX +Sync Pull + +Channel gmail-base +Far :gmail-remote: +Near :gmail-maildir: +Create Near +Expunge Near +Pattern INBOX "[Google Mail]/Sent Mail" "[Google Mail]/Drafts" "[Google Mail]/Bin" +Sync Pull + +Channel gmail-others +Far :gmail-remote: +Near :gmail-maildir: +Create Near +Expunge Near +Pattern * !INBOX !"[Google Mail]/Sent Mail" !"[Google Mail]/Drafts" !"[Google Mail]/Bin" !"[Google Mail]/All Mail" +Sync Pull + +Channel archive-to-gmail +Far :ryan.a.kavanagh.gmail.com: +Near :archive: +Create Both +Expunge Both +Pattern * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Spam" !"[Gmail]/Starred" !"[Gmail]/Trash" +Sync All + +Group inboxes +Channel gmail-inbox +Channel rak-inbox +Channel uqam-inbox diff --git a/dot_mbsyncrc.tmpl b/dot_mbsyncrc.tmpl deleted file mode 100644 index 1bfd928..0000000 --- a/dot_mbsyncrc.tmpl +++ /dev/null @@ -1,219 +0,0 @@ -IMAPAccount UQAM -Host outlook.office365.com -User kavanagh.ryan@uqam.ca -PassCmd "mutt_oauth2.py --encryption-pipe='cat' --decryption-pipe='cat' $XDG_STATE_HOME/xoauth2-tokens/kavanagh.ryan.uqam.ca" -AuthMechs XOAUTH2 -TLSType IMAPS - -IMAPAccount queensu -Host outlook.office365.com -User 9rak@queensu.ca -PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" --client-secret="TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82" --encryption-pipe="cat" --decryption-pipe="cat" $XDG_STATE_HOME/xoauth2-tokens/9rak.queensu.ca" -AuthMechs XOAUTH2 -TLSType IMAPS - -IMAPAccount mcgill -Host outlook.office365.com -User ryan.kavanagh@mail.mcgill.ca -PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" --client-secret="TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82" --encryption-pipe="cat" --decryption-pipe="cat" $XDG_STATE_HOME/xoauth2-tokens/ryan.kavanagh.mail.mcgill.ca" -AuthMechs XOAUTH2 -TLSType IMAPS - -IMAPAccount CMU -Host imap.gmail.com -User rkavanag@alumni.cmu.edu -Pass {{ .password.cmu }} -AuthMechs PLAIN -TLSType IMAPS - -IMAPAccount gmail -Host imap.gmail.com -User ryanakca@gmail.com -Pass {{ .password.gmail }} -AuthMechs PLAIN -TLSType IMAPS - -IMAPAccount ryan.a.kavanagh.gmail.com -Host imap.gmail.com -User ryan.a.kavanagh@gmail.com -PassCmd "~/bin/mutt_oauth2.py --encryption-pipe=cat --decryption-pipe=cat $XDG_STATE_HOME/xoauth2-tokens/ryan.a.kavanagh.gmail.com" -AuthMechs XOAUTH2 -TLSType IMAPS - -IMAPAccount rak -Host hades.rak.ac -User rak -Pass {{ .password.rakac }} -AuthMechs PLAIN -TLSType IMAPS - -IMAPStore uqam-remote -Account UQAM - -IMAPStore queensu-remote -Account queensu - -IMAPStore mcgill-remote -Account mcgill - -IMAPStore cmu-remote -Account CMU - -IMAPStore rak-remote -Account rak - -IMAPStore gmail-remote -Account gmail - -IMAPStore ryan.a.kavanagh.gmail.com -Account ryan.a.kavanagh.gmail.com - -MaildirStore uqam-maildir -Subfolders Verbatim -Path ~/Maildir/UQAM/ -Inbox ~/Maildir/UQAM/INBOX - -MaildirStore cmu-maildir -Subfolders Verbatim -Path ~/Maildir/CMU/ -Inbox ~/Maildir/CMU/INBOX - -MaildirStore rak-maildir -Subfolders Verbatim -Path ~/Maildir/rak/ -Inbox ~/Maildir/rak/INBOX - -MaildirStore queensu-maildir -Subfolders Verbatim -Path ~/Maildir/queensu/ -Inbox ~/Maildir/queensu/INBOX - -MaildirStore mcgill-maildir -Subfolders Verbatim -Path ~/Maildir/mcgill/ -Inbox ~/Maildir/mcgill/INBOX - -MaildirStore gmail-maildir -Subfolders Verbatim -Path ~/Maildir/gmail/ -Inbox ~/Maildir/gmail/INBOX - -MaildirStore archive -Subfolders Verbatim -Path ~/Maildir/Archive/ -Inbox ~/Maildir/Archive/INBOX - -Channel uqam-inbox -Far :uqam-remote: -Near :uqam-maildir: -Create Both -Patterns INBOX -Expunge Near -Sync All - -Channel uqam-others -Far :uqam-remote: -Near :uqam-maildir: -Create Both -Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox !Probl* -Expunge Near -Sync All - -Channel queensu -Far :queensu-remote: -Near :queensu-maildir: -Create Both -Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox -Expunge Both -Remove Both -Sync All - -Channel mcgill -Far :mcgill-remote: -Near :mcgill-maildir: -Create Near -Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox -Expunge Near -Sync Pull - -Channel cmu -Far :cmu-remote: -Near :cmu-maildir: -Create Both -Expunge Near -Patterns * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Starred" !"[Gmail]/Bin" -Sync All - -Channel rak-inbox -Far :rak-remote: -Near :rak-maildir: -Create Both -Expunge Near -Patterns INBOX -Sync All - -Channel rak-lists -Far :rak-remote: -Near :rak-maildir: -Create Both -Expunge Near -Patterns Lists/* -Sync All - -Channel rak-misc -Far :rak-remote: -Near :rak-maildir: -Create Both -Expunge Near -Patterns * !Archive !Virtual !Virtual/* !INBOX !Lists !Lists/* -Sync All - -Channel rak-archive -Far :rak-remote: -Near :rak-maildir: -Create Both -Expunge Near -Patterns Archive -Sync All - -Group rak -Channel rak-inbox -Channel rak-lists -Channel rak-misc - -Channel gmail-inbox -Far :gmail-remote: -Near :gmail-maildir: -Create Near -Expunge Near -Pattern INBOX -Sync Pull - -Channel gmail-base -Far :gmail-remote: -Near :gmail-maildir: -Create Near -Expunge Near -Pattern INBOX "[Google Mail]/Sent Mail" "[Google Mail]/Drafts" "[Google Mail]/Bin" -Sync Pull - -Channel gmail-others -Far :gmail-remote: -Near :gmail-maildir: -Create Near -Expunge Near -Pattern * !INBOX !"[Google Mail]/Sent Mail" !"[Google Mail]/Drafts" !"[Google Mail]/Bin" !"[Google Mail]/All Mail" -Sync Pull - -Channel archive-to-gmail -Far :ryan.a.kavanagh.gmail.com: -Near :archive: -Create Both -Expunge Both -Pattern * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Spam" !"[Gmail]/Starred" !"[Gmail]/Trash" -Sync All - -Group inboxes -Channel gmail-inbox -Channel rak-inbox -Channel uqam-inbox -- cgit v1.2.3 From 3b9174fd5241d90231a3c41b22a4cf07b7dbcc4b Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 17 Mar 2025 16:35:40 -0400 Subject: expunge/remove settings --- dot_config/isyncrc.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dot_config/isyncrc.tmpl b/dot_config/isyncrc.tmpl index 1bfd928..f5f943c 100644 --- a/dot_config/isyncrc.tmpl +++ b/dot_config/isyncrc.tmpl @@ -108,7 +108,7 @@ Far :uqam-remote: Near :uqam-maildir: Create Both Patterns INBOX -Expunge Near +Expunge Both Sync All Channel uqam-others @@ -164,6 +164,7 @@ Channel rak-misc Far :rak-remote: Near :rak-maildir: Create Both +Remove Both Expunge Near Patterns * !Archive !Virtual !Virtual/* !INBOX !Lists !Lists/* Sync All @@ -201,6 +202,7 @@ Channel gmail-others Far :gmail-remote: Near :gmail-maildir: Create Near +Remove Both Expunge Near Pattern * !INBOX !"[Google Mail]/Sent Mail" !"[Google Mail]/Drafts" !"[Google Mail]/Bin" !"[Google Mail]/All Mail" Sync Pull @@ -209,6 +211,7 @@ Channel archive-to-gmail Far :ryan.a.kavanagh.gmail.com: Near :archive: Create Both +Remove Both Expunge Both Pattern * !"[Gmail]/All Mail" !"[Gmail]/Important" !"[Gmail]/Spam" !"[Gmail]/Starred" !"[Gmail]/Trash" Sync All -- cgit v1.2.3 From 3b13a56077c80a47246e6b0d28f80247e608c06c Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Mon, 17 Mar 2025 16:37:15 -0400 Subject: mcgill email dead; drop from isyncrc --- dot_config/isyncrc.tmpl | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/dot_config/isyncrc.tmpl b/dot_config/isyncrc.tmpl index f5f943c..0d4db33 100644 --- a/dot_config/isyncrc.tmpl +++ b/dot_config/isyncrc.tmpl @@ -12,13 +12,6 @@ PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" AuthMechs XOAUTH2 TLSType IMAPS -IMAPAccount mcgill -Host outlook.office365.com -User ryan.kavanagh@mail.mcgill.ca -PassCmd "~/bin/mutt_oauth2.py --client-id="08162f7c-0fd2-4200-a84a-f25a4db0b584" --client-secret="TxRBilcHdC6WGBee]fs?QR:SJ8nI[g82" --encryption-pipe="cat" --decryption-pipe="cat" $XDG_STATE_HOME/xoauth2-tokens/ryan.kavanagh.mail.mcgill.ca" -AuthMechs XOAUTH2 -TLSType IMAPS - IMAPAccount CMU Host imap.gmail.com User rkavanag@alumni.cmu.edu @@ -53,9 +46,6 @@ Account UQAM IMAPStore queensu-remote Account queensu -IMAPStore mcgill-remote -Account mcgill - IMAPStore cmu-remote Account CMU @@ -88,11 +78,6 @@ Subfolders Verbatim Path ~/Maildir/queensu/ Inbox ~/Maildir/queensu/INBOX -MaildirStore mcgill-maildir -Subfolders Verbatim -Path ~/Maildir/mcgill/ -Inbox ~/Maildir/mcgill/INBOX - MaildirStore gmail-maildir Subfolders Verbatim Path ~/Maildir/gmail/ @@ -128,14 +113,6 @@ Expunge Both Remove Both Sync All -Channel mcgill -Far :mcgill-remote: -Near :mcgill-maildir: -Create Near -Patterns * !Calendar !Calendar/* !Contacts !"Conversation History" !"Deleted Items" !"Flux RSS" !Journal !Notes !Outbox -Expunge Near -Sync Pull - Channel cmu Far :cmu-remote: Near :cmu-maildir: -- cgit v1.2.3 From abdfc7a467455a1f28173a9e5e410c33ec9b07fa Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 18 Mar 2025 17:29:00 -0400 Subject: mu4e should use default emacs completion --- dot_emacs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dot_emacs b/dot_emacs index b6d199e..51e7622 100644 --- a/dot_emacs +++ b/dot_emacs @@ -691,6 +691,10 @@ Otherwise split the current paragraph into one sentence per line." ;; compose messages in new frame (mu4e-compose-in-new-frame t) + ;; use default emacs completion + (mu4e-read-option-use-builtin nil) + (mu4e-completing-read-function 'completing-read) + ;; hide long list off addresses from main view and silence warnings ;; about mu4e not recognizing user-mail-address against regexp (mu4e-main-hide-personal-addresses t) -- cgit v1.2.3 From 8229dec32c1f0d00d74d2d43cc23066f6dfe5e55 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 18 Mar 2025 17:29:11 -0400 Subject: enable mu4e-column-faces --- dot_emacs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dot_emacs b/dot_emacs index 51e7622..08390ab 100644 --- a/dot_emacs +++ b/dot_emacs @@ -708,6 +708,11 @@ Otherwise split the current paragraph into one sentence per line." ("/gmail/INBOX" . ?g) ("/queensu/INBOX" . ?q)))) +(use-package mu4e-column-faces + :ensure t + :after mu4e + :config (mu4e-column-faces-mode)) + ;; provided through git/chezmoi (use-package mu4e-goodies-tags) -- cgit v1.2.3 From 2c5c57ef3439fc0d558395b8e69781666a1bf285 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Tue, 18 Mar 2025 17:29:42 -0400 Subject: load mu4e-goodies-tags after mu4e --- dot_emacs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dot_emacs b/dot_emacs index 08390ab..49727b6 100644 --- a/dot_emacs +++ b/dot_emacs @@ -714,7 +714,8 @@ Otherwise split the current paragraph into one sentence per line." :config (mu4e-column-faces-mode)) ;; provided through git/chezmoi -(use-package mu4e-goodies-tags) +(use-package mu4e-goodies-tags + :after mu4e) (use-package oauth2 :ensure t) -- cgit v1.2.3 From ce09fac44cac6959d69cd019d32bc7fcb253a4b6 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Fri, 21 Mar 2025 18:12:40 -0400 Subject: Major overhaul emacs --- dot_emacs | 240 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 143 insertions(+), 97 deletions(-) diff --git a/dot_emacs b/dot_emacs index 49727b6..b181f0c 100644 --- a/dot_emacs +++ b/dot_emacs @@ -26,10 +26,11 @@ :bind ; key bindings (("C-x a r" . align-regexp)) :config ; executed after package is loaded - (defadvice ; align-regexp should use spaces. - align-regexp - (around align-regexp-with-spaces activate) + (defun align-regexp--align-regexp-with-spaces () + "Never use tabs for alignment." (let ((indent-tabs-mode nil)) ad-do-it)) + (advice-add 'align-regexp--align-regexp-with-spaces + :around #'align-regexp-with-spaces) :custom (inhibit-startup-screen t) (default-input-method "TeX") @@ -37,6 +38,15 @@ (user-mail-address "rak@rak.ac") (mail-user-agent 'mu4e-user-agent) (read-mail-command 'mu4e) + ;; Support opening new minibuffers from inside existing minibuffers. + (enable-recursive-minibuffers t) + ;; Hide commands in M-x which do not work in the current mode. Vertico + ;; commands are hidden in normal buffers. This setting is useful beyond + ;; Vertico. + (read-extended-command-predicate #'command-completion-default-include-p) + ;; Do not allow the cursor in the minibuffer prompt + (minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt)) :custom-face (default ((t (:family "Iosevka"))))) @@ -62,18 +72,18 @@ ;; need to redefine a few of these because the defaults ;; overlap with customized aw-keys (setq aw-dispatch-alist - '((?x aw-delete-window "Delete Window") - (?m aw-swap-window "Swap Windows") - (?M aw-move-window "Move Window") - (?c aw-copy-window "Copy Window") - (?j aw-switch-buffer-in-window "Select Buffer") - (?f aw-flip-window) - (?p aw-switch-buffer-other-window "Switch Buffer Other Window") - (?c aw-split-window-fair "Split Fair Window") - (?v aw-split-window-vert "Split Vert Window") - (?b aw-split-window-horz "Split Horz Window") - (?1 delete-other-windows "Delete Other Windows") - (?? aw-show-dispatch-help)))) + '((?x aw-delete-window "Delete Window") + (?m aw-swap-window "Swap Windows") + (?M aw-move-window "Move Window") + (?c aw-copy-window "Copy Window") + (?j aw-switch-buffer-in-window "Select Buffer") + (?f aw-flip-window) + (?p aw-switch-buffer-other-window "Switch Buffer Other Window") + (?c aw-split-window-fair "Split Fair Window") + (?v aw-split-window-vert "Split Vert Window") + (?b aw-split-window-horz "Split Horz Window") + (?1 delete-other-windows "Delete Other Windows") + (?? aw-show-dispatch-help)))) (use-package aggressive-indent :ensure t @@ -219,64 +229,70 @@ Extended Format date in the date field and return it as a string obeing (bibtex-completion-notes-extension ".org") (bibtex-completion-pdf-extension '(".pdf" ".djvu" ".txt"))) -(use-package cc-mode - :custom - (c-default-style "bsd")) - -(use-package company +(use-package cape :ensure t - :diminish - :bind - ("" . company-indent-or-complete-common) + ;; Bind prefix keymap providing all Cape commands under a mnemonic key. + ;; Press C-c p ? to for help. + :bind ("C-c p" . cape-prefix-map) ;; Alternative key: M-, M-p, M-+ + ;; Alternatively bind Cape commands individually. + ;; :bind (("C-c p d" . cape-dabbrev) + ;; ("C-c p h" . cape-history) + ;; ("C-c p f" . cape-file) + ;; ...) :hook - (after-init . global-company-mode)) + (completion-at-point-functions . cape-dabbrev) + (completion-at-point-functions . cape-file) + (completion-at-point-functions . cape-elisp-block) + (completion-at-point-functions .cape-keyword)) -(use-package company-auctex - :ensure t - :after latex - :config - (company-auctex-init)) +(use-package cc-mode + :custom + (c-default-style "bsd")) (use-package company-bibtex :ensure t :hook (bibtex-mode . (lambda () (add-to-list 'company-backends 'company-bibtex)))) -(use-package company-box - :ensure t - :diminish - :hook (company-mode . company-box-mode)) - (use-package company-coq :ensure t :hook (coq-mode . company-coq-mode)) -(use-package company-math - :ensure t - :config - (add-to-list 'company-backends 'company-math-symbols-unicode) - (add-to-list 'company-backends 'company-latex-commands)) - -(use-package company-org-block +(use-package consult :ensure t - :hook ((org-mode . (lambda () - (setq-local company-backends '(company-org-block)) - (company-mode +1))))) + :bind + (("C-x b" . consult-buffer) + ("C-x C-f" . find-file) + ("C-s" . consult-line) + ("M-x" . execute-extended-command))) -(use-package counsel +(use-package consult-mu + :after (consult mu4e) + :bind + :custom + ;;maximum number of results shown in minibuffer + (consult-mu-maxnum 200) + ;;show preview when pressing any keys + (consult-mu-preview-key 'any) + ;;do not mark email as read when previewed + (consult-mu-mark-previewed-as-read nil) + ;;do not amrk email as read when selected. This is a good starting point to ensure you would not miss important emails marked as read by mistake especially when trying this package out. Later you can change this to t. + (consult-mu-mark-viewed-as-read nil) + ;; open the message in mu4e-view-buffer when selected. + (consult-mu-action #'consult-mu--view-action)) + +(use-package consult-mu-compose) +(use-package consult-mu-contacts) +(setq consult-mu-compose-preview-key "M-o") +(setq consult-mu-embark-attach-file-key "C-a") + +(use-package corfu :ensure t :bind - (("C-x b" . counsel-switch-buffer) - ("C-x C-b" . counsel-ibuffer) - ("C-x C-f" . counsel-find-file) - ("M-x" . counsel-M-x) - ("M-y" . counsel-yank-pop) - (" i" . counsel-info-lookup-symbol) - (" j" . counsel-set-variable) - (" u" . counsel-unicode-char)) - :config - (add-to-list 'ivy-initial-inputs-alist - '(counsel-M-x . ""))) + (:map corfu-map + ("SPC" . corfu-insert-separator)) + :init + (global-corfu-mode)) (use-package csv-mode :ensure t) @@ -285,6 +301,19 @@ Extended Format date in the date field and return it as a string obeing :custom (custom-file null-device "Don't store customizations")) +;; Use Dabbrev with Corfu! +(use-package dabbrev + :ensure t + ;; Swap M-/ and C-M-/ + :bind (("M-/" . dabbrev-completion) + ("C-M-/" . dabbrev-expand)) + :config + (add-to-list 'dabbrev-ignored-buffer-regexps "\\` ") + ;; Since 29.1, use `dabbrev-ignored-buffer-regexps' on older. + (add-to-list 'dabbrev-ignored-buffer-modes 'doc-view-mode) + (add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode) + (add-to-list 'dabbrev-ignored-buffer-modes 'tags-table-mode)) + (use-package diary :ensure diary-lib :custom @@ -323,6 +352,17 @@ Extended Format date in the date field and return it as a string obeing :custom (elpy-rpc-python-command "python3")) +(use-package embark + :ensure t + :bind + (("C-." . embark-act) ;; Begin the embark process + ("C-;" . embark-dwim) ;; good alternative: M-. + ("C-h B" . embark-bindings)) ;; alternative for `describe-bindings' + ) + +(use-package embark-consult + :ensure t) + (use-package ess :ensure t) @@ -349,13 +389,11 @@ Extended Format date in the date field and return it as a string obeing :config (unbind-key "C-;" flyspell-mode-map)) -(use-package flyspell-correct-ivy - :ensure t +(use-package flyspell-correct :after flyspell :bind - ("C-" . flyspell-correct-wrapper) - :config - (setq flyspell-correct-interface #'flyspell-correct-ivy)) + (:map flyspell-mode-map + ("C-;" . flyspell-correct-wrapper))) (use-package gnus :ensure t @@ -421,19 +459,6 @@ Extended Format date in the date field and return it as a string obeing :custom (ispell-dictionary "en_CA-w_accents")) -(use-package ivy - :ensure t - :diminish - :bind - (("C-c v" . ivy-push-view) - ("C-c V" . ivy-pop-view) - ("C-c C-r" . ivy-resume)) - :custom - (ivy-use-virtual-buffers t) - (ivy-count-format "(%d/%d) ") - :config - (ivy-mode 1)) - (use-package ivy-bibtex :ensure t :bind (("C-c b" . ivy-bibtex))) @@ -513,10 +538,16 @@ Otherwise split the current paragraph into one sentence per line." (:map LaTeX-mode-map ("M-q" . ales/fill-paragraph))) -(use-package libmpdel - ;; used by mpdel to connect to mpd +(use-package lsp-mode + :ensure t :custom - (libmpdel-hostname "asteria.home.arpa")) + (lsp-completion-provider :none) ;; we use Corfu! + :init + (defun my/lsp-mode-setup-completion () + (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) + '(orderless))) ;; Configure orderless + :hook + (lsp-completion-mode . my/lsp-mode-setup-completion)) (use-package magit :ensure t @@ -525,6 +556,13 @@ Otherwise split the current paragraph into one sentence per line." :custom (magit-diff-refine-hunk 'all)) +(use-package marginalia + :ensure t + :bind (:map minibuffer-local-map + ("M-A" . marginalia-cycle)) + :init + (marginalia-mode)) + (use-package markdown-mode :ensure t :init @@ -570,14 +608,6 @@ Otherwise split the current paragraph into one sentence per line." :custom (mpc-host "asteria.home.arpa")) -(use-package mpdel - ;; mpd client - ;; host/port customization under libmpdel package - :ensure t - :diminish - :config - (mpdel-mode)) - (use-package mu4e :ensure t :bind @@ -726,6 +756,16 @@ Otherwise split the current paragraph into one sentence per line." (use-package octave :mode ("\\.m\'" . octave-mode)) +(use-package orderless + :ensure t + :custom + ;; Configure a custom style dispatcher (see the Consult wiki) + ;; (orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch)) + ;; (orderless-component-separator #'orderless-escapable-split-on-space) + (completion-styles '(orderless basic)) + (completion-category-defaults nil) + (completion-category-overrides '((file (styles partial-completion))))) + (use-package org :bind (:map org-mode-map ("" . org-cycle)) @@ -1103,6 +1143,11 @@ If not, issue a warning." (use-package sass-mode :ensure t) +;; Persist history over Emacs restarts. Vertico sorts by history position. +(use-package savehist + :init + (savehist-mode)) + (use-package scroll-bar :custom (scroll-bar-mode nil)) @@ -1139,11 +1184,6 @@ If not, issue a warning." :ensure t :requires spaceline-config) -(use-package swiper - :ensure t - :bind - (("C-s" . swiper))) - (use-package tex :ensure auctex :custom @@ -1183,18 +1223,24 @@ If not, issue a warning." :config (add-hook 'tuareg-mode-hook 'merlin-mode t)) -(use-package twittering-mode - :ensure t - :custom - (twittering-icon-mode t) - (twittering-icon-storage-file "~/.emacs.d/storage/twittering-mode-icons.gz") - (twittering-use-icon-storage t)) - (use-package vc-git :requires vc :config (add-to-list 'vc-handled-backends 'git)) +(use-package vertico + :ensure t + :custom + (vertico-scroll-margin 0) ;; Different scroll margin + (vertico-count 20) ;; Show more candidates + (vertico-resize t) ;; Grow and shrink the Vertico minibuffer + (vertico-cycle t) ;; Enable cycling for `vertico-next/previous' + :init + (vertico-mode)) + +(use-package vertico-directory + :ensure vertico) + (use-package visual-fill-column :ensure t) -- cgit v1.2.3