Update init.el
This commit is contained in:
parent
19043ee1bb
commit
24837ac1de
69
init.el
69
init.el
@ -3,7 +3,7 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Some other config files
|
;; Some other config files
|
||||||
(add-to-list 'load-path (expand-file-name "elisp"))
|
(add-to-list 'load-path "~/.emacs.d/elisp")
|
||||||
|
|
||||||
;; Set package dir to follow no-littering conventions
|
;; Set package dir to follow no-littering conventions
|
||||||
(setq package-user-dir "~/.emacs.d/var/elpa")
|
(setq package-user-dir "~/.emacs.d/var/elpa")
|
||||||
@ -57,8 +57,11 @@
|
|||||||
;; Terminal mouse support
|
;; Terminal mouse support
|
||||||
(xterm-mouse-mode 1)
|
(xterm-mouse-mode 1)
|
||||||
|
|
||||||
;; Better mouse scrolling
|
;; Better scrolling
|
||||||
(setq mouse-scroll-delay 0)
|
(setq mouse-scroll-delay 0
|
||||||
|
scroll-conservatively 10
|
||||||
|
scroll-margin 2
|
||||||
|
scroll-preserve-screen-position t)
|
||||||
|
|
||||||
;; Make show paren instant
|
;; Make show paren instant
|
||||||
(setq show-paren-delay 0)
|
(setq show-paren-delay 0)
|
||||||
@ -67,9 +70,6 @@
|
|||||||
;; Display line numbers
|
;; Display line numbers
|
||||||
(global-display-line-numbers-mode 1)
|
(global-display-line-numbers-mode 1)
|
||||||
|
|
||||||
;; Show some more context arround the point
|
|
||||||
(setq scroll-margin 2)
|
|
||||||
|
|
||||||
;; Allow the frame to be any size
|
;; Allow the frame to be any size
|
||||||
(setq frame-resize-pixelwise t)
|
(setq frame-resize-pixelwise t)
|
||||||
|
|
||||||
@ -86,9 +86,6 @@
|
|||||||
;; No scroll bars
|
;; No scroll bars
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
|
|
||||||
;; Some better scrolling
|
|
||||||
(pixel-scroll-mode 1)
|
|
||||||
|
|
||||||
;; Visual line mode
|
;; Visual line mode
|
||||||
(global-visual-line-mode 1)
|
(global-visual-line-mode 1)
|
||||||
|
|
||||||
@ -124,6 +121,9 @@
|
|||||||
|
|
||||||
;; recentf
|
;; recentf
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
|
:init
|
||||||
|
(setq recentf-exclude '("^/tmp/.*"
|
||||||
|
"^~/.mail/[^/]/Drafts/.+"))
|
||||||
:config
|
:config
|
||||||
(recentf-mode 1))
|
(recentf-mode 1))
|
||||||
|
|
||||||
@ -210,6 +210,14 @@ visual states."
|
|||||||
("M-DEL" . vertico-directory-delete-word))
|
("M-DEL" . vertico-directory-delete-word))
|
||||||
:hook (minibuffer-setup . cursor-intangible-mode)
|
:hook (minibuffer-setup . cursor-intangible-mode)
|
||||||
:init
|
:init
|
||||||
|
(defun my/crm-indicator (args)
|
||||||
|
(cons (format "[CRM%s] %s"
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
|
||||||
|
crm-separator)
|
||||||
|
(car args))
|
||||||
|
(cdr args)))
|
||||||
|
(advice-add #'completing-read-multiple :filter-args #'my/crm-indicator)
|
||||||
(setq vertico-cycle t
|
(setq vertico-cycle t
|
||||||
enable-recursive-minibuffers t
|
enable-recursive-minibuffers t
|
||||||
read-extended-command-predicate #'command-completion-default-include-p
|
read-extended-command-predicate #'command-completion-default-include-p
|
||||||
@ -321,7 +329,8 @@ visual states."
|
|||||||
:init
|
:init
|
||||||
(defun my/-cape-setup-text-mode ()
|
(defun my/-cape-setup-text-mode ()
|
||||||
(setq-local completion-at-point-functions
|
(setq-local completion-at-point-functions
|
||||||
'(cape-dict cape-dabbrev)))
|
'(cape-dict cape-dabbrev)
|
||||||
|
corfu-auto nil))
|
||||||
(add-to-list 'completion-at-point-functions #'cape-file))
|
(add-to-list 'completion-at-point-functions #'cape-file))
|
||||||
|
|
||||||
;; xref
|
;; xref
|
||||||
@ -393,11 +402,12 @@ visual states."
|
|||||||
|
|
||||||
;; vterm
|
;; vterm
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
|
:hook (vterm-mode . with-editor-export-editor)
|
||||||
:bind ("C-x C-a" . vterm))
|
:bind ("C-x C-a" . vterm))
|
||||||
|
|
||||||
;; proced
|
;; proced
|
||||||
(use-package proced
|
(use-package proced
|
||||||
:bind ("C-x o" . proced)
|
:bind ("C-x j" . proced)
|
||||||
:init
|
:init
|
||||||
(setq proced-auto-update-flag t
|
(setq proced-auto-update-flag t
|
||||||
proced-auto-update-interval 1))
|
proced-auto-update-interval 1))
|
||||||
@ -419,18 +429,47 @@ visual states."
|
|||||||
|
|
||||||
;; magit
|
;; magit
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:bind ("C-x C-m" . magit)
|
:bind ("C-x C-y" . magit)
|
||||||
:init
|
:init
|
||||||
(evil-define-key '(normal visual motion) magit-mode-map
|
(evil-define-key '(normal visual motion) magit-mode-map
|
||||||
"s" #'magit-stage-file
|
"s" #'magit-stage-file
|
||||||
"S" #'magit-stage-modified))
|
"S" #'magit-stage-modified))
|
||||||
|
|
||||||
|
;; org-mode
|
||||||
|
(use-package org
|
||||||
|
:bind (("C-c c" . org-capture)
|
||||||
|
("C-c a" . org-agenda)
|
||||||
|
("C-c l" . org-store-link)
|
||||||
|
:map org-mode-map
|
||||||
|
("C-c t" . org-table-create))
|
||||||
|
:init
|
||||||
|
(setq org-directory "~/org"
|
||||||
|
org-agenda-files '("~/org/")
|
||||||
|
org-log-into-drawer t
|
||||||
|
org-log-done 'time
|
||||||
|
org-log-redeadline 'time
|
||||||
|
org-log-reschedule 'time))
|
||||||
|
(use-package evil-org
|
||||||
|
:after org
|
||||||
|
:hook (org-mode . my/evil-org-mode-enable)
|
||||||
|
:init
|
||||||
|
(defun my/evil-org-mode-enable ()
|
||||||
|
(evil-org-mode 1))
|
||||||
|
(require 'evil-org-agenda)
|
||||||
|
(evil-org-agenda-set-keys))
|
||||||
|
|
||||||
|
;; khard contacts
|
||||||
|
(require 'khard)
|
||||||
|
|
||||||
;; mu4e
|
;; mu4e
|
||||||
(require 'auth-source-pass)
|
(require 'auth-source-pass)
|
||||||
(auth-source-pass-enable)
|
(auth-source-pass-enable)
|
||||||
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
|
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/")
|
||||||
(require 'mu4e)
|
(require 'mu4e)
|
||||||
(add-hook 'mu4e-index-updated-hook #'my/-mu4e-enable-index-messages)
|
(add-hook 'mu4e-index-updated-hook #'my/-mu4e-enable-index-messages)
|
||||||
|
(global-set-key (kbd "C-x C-m") #'mu4e)
|
||||||
|
(global-set-key (kbd "C-x m") #'mu4e-compose-new)
|
||||||
|
(define-key message-mode-map (kbd "C-c k") #'khard-insert-email-contact)
|
||||||
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
|
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
|
||||||
(defun my/-mu4e-enable-index-messages ()
|
(defun my/-mu4e-enable-index-messages ()
|
||||||
(setq mu4e-hide-index-messages nil))
|
(setq mu4e-hide-index-messages nil))
|
||||||
@ -456,7 +495,7 @@ visual states."
|
|||||||
:maildir))))
|
:maildir))))
|
||||||
:vars `((user-mail-address . ,(auth-source-pass-get "email" "emacs/mu4e-protonmail"))
|
:vars `((user-mail-address . ,(auth-source-pass-get "email" "emacs/mu4e-protonmail"))
|
||||||
(user-full-name . ,(auth-source-pass-get "name" "emacs/mu4e-protonmail"))
|
(user-full-name . ,(auth-source-pass-get "name" "emacs/mu4e-protonmail"))
|
||||||
(mu4e-compose-signature nil)
|
(message-signature nil)
|
||||||
(mu4e-refile-folder . "/protonmail/Archive")
|
(mu4e-refile-folder . "/protonmail/Archive")
|
||||||
(mu4e-sent-folder . "/protonmail/Sent")
|
(mu4e-sent-folder . "/protonmail/Sent")
|
||||||
(mu4e-drafts-folder . "/protonmail/Drafts")
|
(mu4e-drafts-folder . "/protonmail/Drafts")
|
||||||
@ -474,6 +513,8 @@ visual states."
|
|||||||
(setq mu4e-alert-set-window-urgency nil)
|
(setq mu4e-alert-set-window-urgency nil)
|
||||||
:config
|
:config
|
||||||
(mu4e-alert-set-default-style 'libnotify))
|
(mu4e-alert-set-default-style 'libnotify))
|
||||||
|
(mu4e t)
|
||||||
|
(mu4e-context-switch nil "Personal")
|
||||||
|
|
||||||
;; rainbow-delimiters
|
;; rainbow-delimiters
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
@ -512,3 +553,5 @@ visual states."
|
|||||||
:init
|
:init
|
||||||
(setq doom-modeline-support-imenu t)
|
(setq doom-modeline-support-imenu t)
|
||||||
(doom-modeline-mode 1))
|
(doom-modeline-mode 1))
|
||||||
|
|
||||||
|
;;; init.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user