Remove visual-fill-column

Use global-visual-line-mode but disable in certain modes (org,
org-agenda, mu4e main and headers)
This commit is contained in:
Evie Litherland-Smith 2024-12-09 15:14:28 +00:00
parent 6a562e3d45
commit 9daa422d20
2 changed files with 8 additions and 30 deletions

View file

@ -37,7 +37,6 @@
nerd-icons-dired
nerd-icons-ibuffer
nerd-icons-corfu
visual-fill-column
# Email and Calendar
khalel
mu4e

View file

@ -66,33 +66,8 @@
(column-number-mode +1)
(size-indication-mode -1)
(add-hook 'help-mode-hook (lambda () (visual-line-mode +1)))
(use-package visual-fill-column
:functions (visual-fill-column-mode)
:hook ((prog-mode . (lambda ()
(visual-line-mode +1)
(visual-fill-column-mode +1)))
((Info-mode man-common) . (lambda ()
(setq-local visual-fill-column-width 80)
(visual-line-mode +1)
(visual-fill-column-mode +1))))
:custom
(visual-fill-column-width 120)
(visual-fill-column-center-text t)
(visual-fill-column-enable-sensible-window-split t)
:config
(setopt visual-line-fringe-indicators '(left-curly-arrow right-curly-arrow)))
(with-eval-after-load 'mu4e
(add-hook 'mu4e-view-mode-hook
#'(lambda ()
(visual-line-mode +1)
(visual-fill-column-mode +1)))
(add-hook 'mu4e-compose-mode-hook
#'(lambda ()
(visual-line-mode +1)
(visual-fill-column-mode +1))))
(global-visual-line-mode +1)
(setopt visual-line-fringe-indicators '(left-curly-arrow right-curly-arrow))
(use-package ligature
:load-path "external-packages/ligature.el/"
@ -210,6 +185,7 @@
(("C-c m" . mu4e)
:map mu4e-view-mode-map
("o n" . mu4e-org-store-and-capture))
:hook ((mu4e-main-mode mu4e-headers-mode) . (lambda () (visual-line-mode -1)))
:custom
(mu4e-read-option-use-builtin nil)
(mu4e-completing-read-function #'completing-read)
@ -616,7 +592,9 @@
(use-package org
:demand
:defines org-mode-map
:hook ((org-mode . turn-on-auto-fill))
:hook ((org-mode . (lambda ()
(visual-line-mode -1)
(turn-on-auto-fill))))
:bind ( :map org-mode-map
("<remap> <imenu>" . consult-org-heading)
("<remap> <org-goto>" . consult-org-heading))
@ -784,7 +762,8 @@
(use-package org-agenda
:after (org appt)
:bind (("C-c a" . org-agenda))
:hook (org-agenda-finalize . org-agenda-to-appt)
:hook ((org-agenda-mode . (lambda () (visual-line-mode -1)))
(org-agenda-finalize . org-agenda-to-appt))
:custom
(org-agenda-span 'day)
(org-agenda-start-on-weekday 1)