From e035d7a3781c5ba213d525fcac901b710ff3c9d6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 19 Apr 2021 16:16:19 -0500 Subject: Make `visual-line-mode' and `olivetti-mode' prettier --- init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 25e0055..6f97e02 100644 --- a/init.el +++ b/init.el @@ -90,6 +90,11 @@ (global-display-fill-column-indicator-mode +1) (global-so-long-mode +1) + (add-hook 'visual-line-mode-hook + (defun acdw/disable-fill-column-indicator () + (display-fill-column-indicator-mode + (if visual-line-mode -1 +1)))) + ;; Whitespace (:option whitespace-style '(empty indentation space-before-tab space-after-tab) @@ -723,7 +728,13 @@ if ripgrep is installed, otherwise `consult-grep'." (setup (:straight olivetti) (:option olivetti-body-width (+ fill-column 4) - olivetti-minimum-body-width fill-column)) + olivetti-minimum-body-width fill-column) + (add-hook 'olivetti-mode-hook + (defun acdw/olivetti-mode-hook () + (if olivetti-mode + (setq-local indicate-empty-lines nil + indicate-buffer-boundaries nil) + (acdw/setup-regular-modes))))) (setup (:straight form-feed) (global-form-feed-mode +1)) -- cgit 1.4.1-21-gabe81