-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhooks.el
51 lines (38 loc) · 1.4 KB
/
hooks.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
;;; hooks.el --- Mode hooks -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(add-hook 'find-function-after-hook #'view-mode-enter)
(add-hook 'Info-selection-hook 'info-colors-fontify-node)
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
(add-hook 'eshell-mode-hook
(defun eshell-hook ()
(eshell/addpath (concat (getenv "HOME") "/.local/bin"))
(eshell/addpath (concat (getenv "HOME") "/bin"))))
(add-hook 'markdown-mode-hook
(defun markdown-hook ()
(keymap-local-set "C-S-p" #'markdown-previous-visible-heading)
(keymap-local-set "C-S-n" #'markdown-next-visible-heading)))
(add-hook 'sh-mode-hook
(defun sh-hook ()
(flycheck-mode)))
(add-hook 'prog-mode-hook
(defun prog-hook ()
(display-line-numbers-mode +1)
(goggles-mode)
(hl-line-mode)
(flycheck-mode)
(keymap-local-set "C-c c" #'compile)))
(add-hook 'text-mode-hook
(defun text-hook ()))
(add-hook 'outline-minor-mode-hook
(defun outline-hook ()
(outline-cycle-buffer 1)))
(add-hook 'diff-mode-hook
(defun diff-hook ()
(keymap-local-unset "M-o")))
(add-hook 'emacs-news-view-mode-hook
(defun emacs-news-hook ()
(keymap-local-set "C-S-n" #'outline-next-visible-heading)
(keymap-local-set "C-S-p" #'outline-previous-visible-heading)))
(provide 'hooks)
;;; hooks.el ends here.