diff --git a/home/emacs/default.nix b/home/emacs/default.nix index bc9e5c48..64859af5 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -37,6 +37,7 @@ direnv goto-chg rainbow-delimiters + aggressive-indent nix-mode anaconda-mode rust-mode diff --git a/home/emacs/init.el b/home/emacs/init.el index 95a65c8d..092a12a2 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -104,8 +104,6 @@ (tool-bar-mode -1) (scroll-bar-mode -1) (tab-bar-mode -1) -(line-number-mode +1) -(column-number-mode +1) (global-display-line-numbers-mode -1) (global-prettify-symbols-mode +1) (global-visual-line-mode +1) @@ -233,11 +231,14 @@ ;; per mode with `ligature-mode'. (global-ligature-mode t)) -;; Doom-Modeline +(line-number-mode +1) +(column-number-mode +1) +(size-indication-mode +1) +(display-time-mode -1) +(display-battery-mode -1) + (setq doom-modeline-icon t - doom-modeline-mu4e nil ;; Use mu4e own formatting - doom-modeline-persp-name nil - doom-modeline-persp-icon nil) + doom-modeline-mu4e t) (use-package doom-modeline :ensure t :config @@ -430,12 +431,6 @@ (project-find-dir "Find directory") (project-eshell "Eshell"))) -(use-package perspective - :ensure t - :demand t - :bind (("C-c p p" . persp-switch) - ("C-c p r" . persp-rename))) - (setq magit-define-global-key-bindings nil magit-clone-default-directory "~/Projects/" magit-commit-show-diff nil @@ -550,6 +545,10 @@ :config (add-to-list 'completion-at-point-functions #'yasnippet-capf)) +(use-package aggressive-indent + :ensure t + :hook prog-mode) + (unless (package-installed-p 'kbd-mode) (package-vc-install '(kbd-mode . (:url "https://github.com/kmonad/kbd-mode")))) @@ -601,41 +600,42 @@ (:maildir "/Outlook/Inbox/" :key ?w))) (use-package mu4e - :after vertico :bind (("C-c o m" . mu4e)) - :config (setq mu4e-contexts - (list - (make-mu4e-context - :name "Xenia" - :vars '((user-mail-address . "evie@xenia.me.uk") - (mu4e-sent-folder . "/Proton/Sent") - (mu4e-drafts-folder . "/Proton/Drafts") - (mu4e-trash-folder . "/Proton/Trash") - (mu4e-refile-folder . "/Proton/Archive"))) - (make-mu4e-context - :name "Proton" - :match-func (lambda (msg) (when msg (string-prefix-p "/Proton" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "e.litherlandsmith@proton.me") - (mu4e-sent-folder . "/Proton/Sent") - (mu4e-drafts-folder . "/Proton/Drafts") - (mu4e-trash-folder . "/Proton/Trash") - (mu4e-refile-folder . "/Proton/Archive"))) - (make-mu4e-context - :name "iCloud" - :match-func (lambda (msg) (when msg (string-prefix-p "/iCloud" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "e.litherlandsmith@icloud.com") - (mu4e-sent-folder . "/iCloud/Sent Messages") - (mu4e-drafts-folder . "/iCloud/Drafts") - (mu4e-trash-folder . "/iCloud/Deleted Messages") - (mu4e-refile-folder . "/iCloud/Archive"))) - (make-mu4e-context - :name "Work" - :match-func (lambda (msg) (when msg (string-prefix-p "/Outlook" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "evie.litherland-smith@ukaea.uk") - (mu4e-sent-folder . "/Outlook/Sent") - (mu4e-drafts-folder . "/Outlook/Drafts") - (mu4e-trash-folder . "/Outlook/Trash") - (mu4e-refile-folder . "/Outlook/Archive")))))) + :config + (require 'mu4e-org) + (setq mu4e-contexts + (list + (make-mu4e-context + :name "Xenia" + :vars '((user-mail-address . "evie@xenia.me.uk") + (mu4e-sent-folder . "/Proton/Sent") + (mu4e-drafts-folder . "/Proton/Drafts") + (mu4e-trash-folder . "/Proton/Trash") + (mu4e-refile-folder . "/Proton/Archive"))) + (make-mu4e-context + :name "Proton" + :match-func (lambda (msg) (when msg (string-prefix-p "/Proton" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "e.litherlandsmith@proton.me") + (mu4e-sent-folder . "/Proton/Sent") + (mu4e-drafts-folder . "/Proton/Drafts") + (mu4e-trash-folder . "/Proton/Trash") + (mu4e-refile-folder . "/Proton/Archive"))) + (make-mu4e-context + :name "iCloud" + :match-func (lambda (msg) (when msg (string-prefix-p "/iCloud" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "e.litherlandsmith@icloud.com") + (mu4e-sent-folder . "/iCloud/Sent Messages") + (mu4e-drafts-folder . "/iCloud/Drafts") + (mu4e-trash-folder . "/iCloud/Deleted Messages") + (mu4e-refile-folder . "/iCloud/Archive"))) + (make-mu4e-context + :name "Work" + :match-func (lambda (msg) (when msg (string-prefix-p "/Outlook" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "evie.litherland-smith@ukaea.uk") + (mu4e-sent-folder . "/Outlook/Sent") + (mu4e-drafts-folder . "/Outlook/Drafts") + (mu4e-trash-folder . "/Outlook/Trash") + (mu4e-refile-folder . "/Outlook/Archive")))))) (use-package mu4e-alert :after mu4e diff --git a/home/emacs/init.org b/home/emacs/init.org index c32b3b99..99af55d5 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -132,8 +132,6 @@ (tool-bar-mode -1) (scroll-bar-mode -1) (tab-bar-mode -1) - (line-number-mode +1) - (column-number-mode +1) (global-display-line-numbers-mode -1) (global-prettify-symbols-mode +1) (global-visual-line-mode +1) @@ -270,11 +268,17 @@ ** Modeline #+begin_src emacs-lisp - ;; Doom-Modeline + (line-number-mode +1) + (column-number-mode +1) + (size-indication-mode +1) + (display-time-mode -1) + (display-battery-mode -1) +#+end_src + +*** Doom Modeline +#+begin_src emacs-lisp (setq doom-modeline-icon t - doom-modeline-mu4e nil ;; Use mu4e own formatting - doom-modeline-persp-name nil - doom-modeline-persp-icon nil) + doom-modeline-mu4e t) (use-package doom-modeline :ensure t :config @@ -508,15 +512,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]] (project-find-dir "Find directory") (project-eshell "Eshell"))) #+END_SRC -*** Perspective -#+begin_src emacs-lisp - (use-package perspective - :ensure t - :demand t - :bind (("C-c p p" . persp-switch) - ("C-c p r" . persp-rename))) -#+end_src - ** Version control *** Magit #+begin_src emacs-lisp @@ -654,6 +649,13 @@ For reference information, see [[https://orgmode.com][Org-mode website]] :config (add-to-list 'completion-at-point-functions #'yasnippet-capf)) #+end_src +** Aggressive Indent +#+begin_src emacs-lisp + (use-package aggressive-indent + :ensure t + :hook prog-mode) +#+end_src + ** Language-specific settings *** kmonad #+begin_src emacs-lisp @@ -711,41 +713,42 @@ For reference information, see [[https://orgmode.com][Org-mode website]] (:maildir "/Outlook/Inbox/" :key ?w))) (use-package mu4e - :after vertico :bind (("C-c o m" . mu4e)) - :config (setq mu4e-contexts - (list - (make-mu4e-context - :name "Xenia" - :vars '((user-mail-address . "evie@xenia.me.uk") - (mu4e-sent-folder . "/Proton/Sent") - (mu4e-drafts-folder . "/Proton/Drafts") - (mu4e-trash-folder . "/Proton/Trash") - (mu4e-refile-folder . "/Proton/Archive"))) - (make-mu4e-context - :name "Proton" - :match-func (lambda (msg) (when msg (string-prefix-p "/Proton" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "e.litherlandsmith@proton.me") - (mu4e-sent-folder . "/Proton/Sent") - (mu4e-drafts-folder . "/Proton/Drafts") - (mu4e-trash-folder . "/Proton/Trash") - (mu4e-refile-folder . "/Proton/Archive"))) - (make-mu4e-context - :name "iCloud" - :match-func (lambda (msg) (when msg (string-prefix-p "/iCloud" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "e.litherlandsmith@icloud.com") - (mu4e-sent-folder . "/iCloud/Sent Messages") - (mu4e-drafts-folder . "/iCloud/Drafts") - (mu4e-trash-folder . "/iCloud/Deleted Messages") - (mu4e-refile-folder . "/iCloud/Archive"))) - (make-mu4e-context - :name "Work" - :match-func (lambda (msg) (when msg (string-prefix-p "/Outlook" (mu4e-message-field msg :maildir)))) - :vars '((user-mail-address . "evie.litherland-smith@ukaea.uk") - (mu4e-sent-folder . "/Outlook/Sent") - (mu4e-drafts-folder . "/Outlook/Drafts") - (mu4e-trash-folder . "/Outlook/Trash") - (mu4e-refile-folder . "/Outlook/Archive")))))) + :config + (require 'mu4e-org) + (setq mu4e-contexts + (list + (make-mu4e-context + :name "Xenia" + :vars '((user-mail-address . "evie@xenia.me.uk") + (mu4e-sent-folder . "/Proton/Sent") + (mu4e-drafts-folder . "/Proton/Drafts") + (mu4e-trash-folder . "/Proton/Trash") + (mu4e-refile-folder . "/Proton/Archive"))) + (make-mu4e-context + :name "Proton" + :match-func (lambda (msg) (when msg (string-prefix-p "/Proton" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "e.litherlandsmith@proton.me") + (mu4e-sent-folder . "/Proton/Sent") + (mu4e-drafts-folder . "/Proton/Drafts") + (mu4e-trash-folder . "/Proton/Trash") + (mu4e-refile-folder . "/Proton/Archive"))) + (make-mu4e-context + :name "iCloud" + :match-func (lambda (msg) (when msg (string-prefix-p "/iCloud" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "e.litherlandsmith@icloud.com") + (mu4e-sent-folder . "/iCloud/Sent Messages") + (mu4e-drafts-folder . "/iCloud/Drafts") + (mu4e-trash-folder . "/iCloud/Deleted Messages") + (mu4e-refile-folder . "/iCloud/Archive"))) + (make-mu4e-context + :name "Work" + :match-func (lambda (msg) (when msg (string-prefix-p "/Outlook" (mu4e-message-field msg :maildir)))) + :vars '((user-mail-address . "evie.litherland-smith@ukaea.uk") + (mu4e-sent-folder . "/Outlook/Sent") + (mu4e-drafts-folder . "/Outlook/Drafts") + (mu4e-trash-folder . "/Outlook/Trash") + (mu4e-refile-folder . "/Outlook/Archive")))))) (use-package mu4e-alert :after mu4e