Swap global-visual-line-mode for mode-specific hooks

This commit is contained in:
Evie Litherland-Smith 2024-01-14 11:01:27 +00:00
parent f4d1215567
commit 899ef185fd

View file

@ -204,7 +204,9 @@ Loading this file is handled automatically on my [[https://git.xenia.me.uk/xenia
(with-eval-after-load 'diminish (with-eval-after-load 'diminish
(diminish 'visual-line-mode)) (diminish 'visual-line-mode))
(global-visual-line-mode +1) (global-visual-line-mode -1)
(add-hook 'text-mode-hook #'(lambda () (visual-line-mode +1)))
(add-hook 'prog-mode-hook #'(lambda () (visual-line-mode +1)))
(use-package which-key (use-package which-key
:ensure t :ensure t
@ -1080,9 +1082,8 @@ Set fill column to 88 and enable display in python buffers
(("C-c m" . mu4e) (("C-c m" . mu4e)
:map mu4e-view-mode-map :map mu4e-view-mode-map
("o n" . mu4e-org-store-and-capture)) ("o n" . mu4e-org-store-and-capture))
:hook (((mu4e-view-mode mu4e-compose-mode mu4e-org-mode) . (lambda () (visual-line-mode +1))))
:custom :custom
(add-hook 'mu4e-compose-mode-hook (lambda () (auto-save-mode -1))) ; Don't auto-save to drafts
(add-hook 'mu4e-headers-mode-hook (lambda () (visual-line-mode -1))) ; Disable visual-line / word wrapping in mu4e headers
(mu4e-completing-read-function #'completing-read-default) (mu4e-completing-read-function #'completing-read-default)
(mu4e-split-view 'horizontal) (mu4e-split-view 'horizontal)
(mu4e-attachment-dir "~/Downloads") (mu4e-attachment-dir "~/Downloads")