Fix some minor mode stuff

This commit is contained in:
Alexander Rosenberg 2023-09-30 21:41:19 -07:00
parent ef970dc06e
commit 0e6184f4b9
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

21
init.el
View File

@ -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))