diff options
author | tdback <tyler@tdback.net> | 2025-02-11 23:30:17 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-02-11 23:30:17 -0500 |
commit | 171608ece8d234df5d638c8a46934d3ec708e6fd (patch) | |
tree | 13188031887bf40ca1e250ef4cdb1828b837745a /lisp/td-common.el | |
parent | ff49b83fe4cf5e6e05daed48415a1cf5a854435b (diff) |
lisp: create separate theme and shell modules. add expand-region
Diffstat (limited to 'lisp/td-common.el')
-rw-r--r-- | lisp/td-common.el | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/lisp/td-common.el b/lisp/td-common.el index d355609..ae80872 100644 --- a/lisp/td-common.el +++ b/lisp/td-common.el @@ -1,7 +1,21 @@ -;;; td-common.el --- common configuration -*- lexical-binding: t; -*- +;;; td-common.el --- a step up from vanilla -*- lexical-binding: t; -*- ;;; Code: +;;; Functions + +(defun td/quit-if-not-in-macro () + "Allow for an unintentional `C-g' when recording macros." + (interactive) + (if (or defining-kbd-macro executing-kbd-macro) + (progn + (if (region-active-p) + (deactivate-mark) + (message "Macro running. Can't quit."))) + (keyboard-quit))) + +;;; Packages + (use-package async :ensure t :config @@ -33,34 +47,13 @@ :custom (consult-dir-project-list-function nil)) -(use-package doom-modeline - :ensure t - :init - (doom-modeline-mode 1) - :custom - (doom-modeline-height 10) - (doom-modeline-buffer-encoding nil) - (doom-modeline-modal-icon nil)) - -(use-package eat - :ensure t - :bind (("C-x E" . eat)) - :custom - (eat-enable-autoline-mode t)) - -(use-package ef-themes - :ensure t - :config - ;; By default start with a light theme. - (load-theme 'ef-day t)) - (use-package emacs :ensure nil :demand t :bind (("M-c" . capitalize-dwim) ("M-u" . upcase-dwim) ("M-l" . downcase-dwim) - ("C-x S" . eshell) + ("C-x E" . eshell) ("C-x M-t" . transpose-regions) ("C-g" . td/quit-if-not-in-macro))) @@ -81,7 +74,11 @@ :ensure t :after embark) -(use-package help +(use-package expand-region + :ensure t + :bind ([remap mark-paragraph] . er/expand-region)) + +(use-package helpful :ensure t :custom (counsel-describe-function-function #'helpful-callable) |