From 54209e748b3d2b28623ca860fcfc90855f283444 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 25 May 2019 18:36:29 -0400 Subject: [PATCH] emacs: update packages, add delight, and :delight some modes for more cleanliness and consistency in mode-line --- .emacs.d/init.el | 49 +++++++++++++++++++++------ .emacs.d/straight/versions/default.el | 7 ++-- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index f08e8c5..d6811e7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -164,6 +164,8 @@ (setq use-package-always-defer t) (require 'bind-key) +(use-package delight) + ;; for browsing the Emacsmirror package database (comment (use-package epkg @@ -650,6 +652,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-package ivy :defer 0.3 + :delight ;; " 🙒" :bind (:map ivy-minibuffer-map ([escape] . keyboard-escape-quit) @@ -677,6 +680,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-package counsel :after ivy + :delight :bind (([remap execute-extended-command] . counsel-M-x) ([remap find-file] . counsel-find-file) ("C-c x" . counsel-M-x) @@ -817,6 +821,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-feature outline :hook (prog-mode . outline-minor-mode) + :delight (outline-minor-mode " outl") :bind (:map outline-minor-mode-map @@ -917,6 +922,7 @@ For disabling the behaviour for certain buffers and/or modes." ;; display Lisp objects at point in the echo area (use-feature eldoc :when (version< "25" emacs-version) + :delight " eldoc" :config (global-eldoc-mode)) ;; highlight matching parens @@ -925,6 +931,7 @@ For disabling the behaviour for certain buffers and/or modes." :config (show-paren-mode)) (use-feature simple + :delight (auto-fill-function " fill") :config (column-number-mode)) ;; save minibuffer history @@ -943,8 +950,7 @@ For disabling the behaviour for certain buffers and/or modes." (add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left)) (use-feature text-mode - :hook ((text-mode . indicate-buffer-boundaries-left) - (text-mode . abbrev-mode))) + :hook (text-mode . indicate-buffer-boundaries-left)) (use-feature conf-mode :mode "\\.*rc$") @@ -954,6 +960,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-package company :defer 0.6 + :delight " company" :bind (:map company-active-map ([tab] . company-complete-common-or-cycle) @@ -979,7 +986,11 @@ For disabling the behaviour for certain buffers and/or modes." (setq flycheck-emacs-lisp-load-path 'inherit) ;; Only flycheck when I actually save the buffer - (setq flycheck-check-syntax-automatically '(mode-enabled save))) + (setq flycheck-check-syntax-automatically '(mode-enabled save)) + :custom (flycheck-mode-line-prefix "flyc")) + +(use-feature flyspell + :delight " flysp") ;; http://endlessparentheses.com/ispell-and-apostrophes.html (use-package ispell @@ -1007,17 +1018,26 @@ For disabling the behaviour for certain buffers and/or modes." (advice-add #'ispell-parse-output :filter-args #'endless/replace-quote)) +(use-feature abbrev + :delight " abbr" + :hook (text-mode . abbrev-mode)) + ;;; Programming modes (use-feature lisp-mode :config - (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode) - (add-hook 'emacs-lisp-mode-hook 'reveal-mode) (defun indent-spaces-mode () (setq indent-tabs-mode nil)) (add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode)) +(use-feature reveal + :delight (reveal-mode " reveal") + :hook (emacs-lisp-mode . reveal-mode)) + +(use-feature elisp-mode + :delight (emacs-lisp-mode "Elisp" :major)) + (use-package alloy-mode :straight (:host github :repo "dwwmmn/alloy-mode") :mode "\\.als\\'" @@ -1225,6 +1245,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-package which-key :defer 0.4 + :delight :config (which-key-add-key-based-replacements ;; prefixes for global prefixes and minor modes @@ -1312,7 +1333,9 @@ For disabling the behaviour for certain buffers and/or modes." :after #'my-projectile-invalidate-cache) (advice-add 'magit-branch-and-checkout :after #'my-projectile-invalidate-cache))) - :custom (projectile-completion-system 'ivy)) + :custom + (projectile-completion-system 'ivy) + (projectile-mode-line-prefix " proj")) (use-package helpful :defer 0.6 @@ -1368,9 +1391,10 @@ For disabling the behaviour for certain buffers and/or modes." ;; easily type pretty quotes & other typography, like ‘’“”-–—«»‹› (use-package typo :defer 0.5 + :delight " typo" :config (typo-global-mode 1) - :hook (text-mode . typo-mode)) + :hook ((text-mode erc-mode) . typo-mode)) ;; highlight TODOs in buffers (use-package hl-todo @@ -1452,6 +1476,7 @@ For disabling the behaviour for certain buffers and/or modes." (use-package page-break-lines :defer 0.5 + :delight " pgln" :config (global-page-break-lines-mode)) @@ -1857,9 +1882,13 @@ https://csclub.uwaterloo.ca/~abandali/") ;; (message-header-cc ((t (:foreground "#333" :weight normal)))) ) -(with-eval-after-load 'mml-sec - (setq mml-secure-openpgp-encrypt-to-self t - mml-secure-openpgp-sign-with-sender t)) +(use-feature mml + :delight " mml") + +(use-feature mml-sec + :custom + (mml-secure-openpgp-encrypt-to-self t) + (mml-secure-openpgp-sign-with-sender t)) (use-feature footnote :after message diff --git a/.emacs.d/straight/versions/default.el b/.emacs.d/straight/versions/default.el index 03309a9..44bd9db 100644 --- a/.emacs.d/straight/versions/default.el +++ b/.emacs.d/straight/versions/default.el @@ -13,7 +13,8 @@ ("crux" . "308f17d914e2cd79cbc809de66d02b03ceb82859") ("dante" . "149dded24ca9cdff09a3d859e4b62638db4aadda") ("dash.el" . "77f3bf40c9c85386a50f2dab3dc950513f6f88bd") - ("debbugs" . "bb26d3bd98e3201f91513d3dbbab4f6f81bb1373") + ("debbugs" . "723a28ed435aaa17ca357eb25b95c40da1c754f4") + ("delight" . "eaff920b9d3ef79d381548476d33e519693e3502") ("diff-hl" . "84a5fe1900af2e5cc522f02749804f0d9f094bbf") ("ebdb" . "05b327013263053a186e4a23997f63595d60a5d2") ("edit-indirect" . "de645d8144e8a08f039a9c88185121ec81d957ef") @@ -37,7 +38,7 @@ ("geiser" . "e60e1c2b1baf8891e1af010af491faf422eacd43") ("ghub" . "0ca5979eb415022ce85d8190fbc9495cffcf9962") ("gntp.el" . "767571135e2c0985944017dc59b0be79af222ef5") - ("gnu-elpa-mirror" . "75289d689daa0cacaf0eec79340b2c8440161639") + ("gnu-elpa-mirror" . "427bfb1e4ee781b14b1a8f62113aa8e34ca287d6") ("go-mode.el" . "120fb911f1d8038f828da85eed8aaad977dabd8c") ("graphql.el" . "e2b309689f4faf9225f290080f836e988c5a576d") ("guix.el" . "11e0dbf6491300d250efb3dc09d634b01e86b35b") @@ -58,7 +59,7 @@ ("magit" . "054d8d9cb029283634e614fa37db6bff8ea8bbdd") ("magit-popup" . "4250c3a606011e3ff2477e3b5bbde2b493f3c85c") ("markdown-mode" . "115f77df9755c6a453f3e5d9623ff885d207ea82") - ("melpa" . "a5d28982425519157a6116c077fbc4be7cfa53be") + ("melpa" . "20148869e301d236bbf335e8545131488ad57f27") ("message-x" . "5524de7bbfdd8749c110f48de5afb024d9f83133") ("multi-term" . "f954e4e18b0a035151d34852387e724d87a3316f") ("multiple-cursors.el" . "5ffb19af48bf8a76ddc9f81745be052f050bddef") -- 2.20.1