From 0e6184f4b93e05feefa933bf3338190ffbc38c2e Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sat, 30 Sep 2023 21:41:19 -0700 Subject: [PATCH] Fix some minor mode stuff --- init.el | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/init.el b/init.el index 7b12491..f94032c 100644 --- a/init.el +++ b/init.el @@ -41,13 +41,11 @@ ;; basic stuff (use-package emacs :hook ((emacs-lisp-mode . my/-emacs-lisp-mode-setup-evil-lookup) - (prog-mode . my/enable-electric-pair-mode)) + (prog-mode . electric-pair-local-mode)) :init (defun my/-emacs-lisp-mode-setup-evil-lookup () (setq-local evil-lookup-func #'my/describe-symbol-at-point)) - (defun my/enable-electric-pair-mode () - (electric-pair-local-mode 1)) (defun my/describe-symbol-at-point () "Calls `describe-symbol' on the return value of `form-at-point'." (interactive) @@ -359,9 +357,9 @@ visual states." ;; flymake (use-package flymake :bind (:map flymake-mode-map - ("C-c e" . my/flymake-show-diagnostic-at-point) - ("C-c C-e" . consult-flymake)) - :hook (emacs-lisp-mode . my/enable-flymake-mode) + ("C-c e" . my/flymake-show-diagnostic-at-point) + ("C-c C-e" . consult-flymake)) + :hook (emacs-lisp-mode . flymake-mode) :init (defun my/flymake-show-diagnostic-at-point () (interactive) @@ -369,9 +367,7 @@ visual states." (diag (and flymake-mode (get-char-property pos 'flymake-diagnostic))) (message (flymake--diag-text diag))) - (popup-tip message))) - (defun my/enable-flymake-mode () - (flymake-mode 1))) + (popup-tip message)))) ;; eldoc (use-package eldoc @@ -396,7 +392,8 @@ visual states." ;; project.el (use-package project :bind (:map project-prefix-map - ("s" . my/project-vterm)) + ("s" . my/project-vterm) + ("u" . my/project-run)) :init (defvar my/project-vterm-hash-table (make-hash-table :test 'equal) "Hash table that maps project root dirs to vterm buffers.") @@ -505,10 +502,8 @@ COMMAND and COMINT are like `compile'." org-log-reschedule 'time)) (use-package evil-org :after org - :hook (org-mode . my/evil-org-mode-enable) + :hook (org-mode . evil-org-mode) :init - (defun my/evil-org-mode-enable () - (evil-org-mode 1)) (require 'evil-org-agenda) (evil-org-agenda-set-keys))