Update init.el

This commit is contained in:
Alexander Rosenberg 2023-09-22 02:50:19 -07:00
parent 69b6aac6c7
commit 94b20c970d
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

51
init.el
View File

@ -54,6 +54,9 @@
;; Terminal mouse support ;; Terminal mouse support
(xterm-mouse-mode 1) (xterm-mouse-mode 1)
;; Better mouse scrolling
(setq mouse-scroll-delay 0)
;; Make show paren instant ;; Make show paren instant
(setq show-paren-delay 0) (setq show-paren-delay 0)
(show-paren-mode 1) (show-paren-mode 1)
@ -135,10 +138,12 @@
(evil-define-key '(normal visual motion) dired-mode-map (evil-define-key '(normal visual motion) dired-mode-map
"u" #'dired-unmark)) "u" #'dired-unmark))
(use-package evil-collection (use-package evil-collection
:after evil
:diminish evil-collection-unimpaired-mode :diminish evil-collection-unimpaired-mode
:config :config
(evil-collection-init)) (evil-collection-init))
(use-package evil-surround (use-package evil-surround
:after evil
:config :config
(evil-define-key 'operator evil-surround-mode-map (evil-define-key 'operator evil-surround-mode-map
"z" #'evil-surround-edit "z" #'evil-surround-edit
@ -148,6 +153,7 @@
"g Z" #'evil-Surround-region) "g Z" #'evil-Surround-region)
(global-evil-surround-mode 1)) (global-evil-surround-mode 1))
(use-package evil-terminal-cursor-changer (use-package evil-terminal-cursor-changer
:after evil
:config :config
(evil-terminal-cursor-changer-activate)) (evil-terminal-cursor-changer-activate))
@ -260,6 +266,8 @@ visual states."
("C-x c f" . consult-focus-lines) ("C-x c f" . consult-focus-lines)
("C-x c r" . consult-recent-file) ("C-x c r" . consult-recent-file)
("C-x c b" . consult-bookmark) ("C-x c b" . consult-bookmark)
("C-x c d" . consult-fd)
("C-x c g" . consult-ripgrep)
("M-g i" . consult-imenu) ("M-g i" . consult-imenu)
("M-g I" . consult-imenu-multi) ("M-g I" . consult-imenu-multi)
("M-g r" . consult-imenu-multi)) ("M-g r" . consult-imenu-multi))
@ -407,6 +415,49 @@ visual states."
"s" #'magit-stage-file "s" #'magit-stage-file
"S" #'magit-stage-modified)) "S" #'magit-stage-modified))
;; mu4e
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
(require 'mu4e)
(add-hook 'mu4e-index-updated-hook #'my/-mu4e-enable-index-messages)
(defun my/-mu4e-enable-index-messages ()
(setq mu4e-hide-index-messages nil))
(defun my/mu4e-update-mail-and-index-silent ()
"Run `mu4e-update-mail-and-index' without any messages in the background."
(setq mu4e-hide-index-messages t)
(mu4e-update-mail-and-index t))
(setq mu4e-change-filenames-when-moving t
mu4e-context-policy 'pick-first
mu4e-index-update-error-warning nil
mu4e-get-mail-command "mbsync protonmail"
mu4e-completing-read-function #'completing-read-default
mu4e-contexts
`(,(make-mu4e-context
:name "Personal"
:enter-func (lambda () (mu4e-message "Entered personal context"))
:match-func (lambda (msg)
(when msg
(string-match-p "^/protonmail/"
(mu4e-message-field msg
:maildir))))
:vars `((user-mail-address . ,(auth-source-pass-get "email" "emacs/mu4e-protonmail"))
(user-full-name . ,(auth-source-pass-get "name" "emacs/mu4e-protonmail"))
(mu4e-compose-signature nil)
(mu4e-refile-folder . "/protonmail/Archive")
(mu4e-sent-folder . "/protonmail/Sent")
(mu4e-drafts-folder . "/protonmail/Drafts")
(mu4e-trash-folder . "/protonmail/Trash")
(mu4e-bookmarks . ((:name "Inbox"
:query "maildir:/protonmail/Inbox"
:key ?i)
(:name "Unread"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:/protonmail/Spam"
:key ?u)))))))
(use-package mu4e-alert
:after mu4e
:hook (after-init . mu4e-alert-enable-notifications)
:config
(mu4e-alert-set-default-style 'libnotify))
;; rainbow-delimiters ;; rainbow-delimiters
(use-package rainbow-delimiters (use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode)) :hook (prog-mode . rainbow-delimiters-mode))