]> git.dkaiser.de - config/emacs.git/commitdiff
Add prog mode to olivetti and change default width
authorDominik Kaiser <dkaisr@proton.me>
Tue, 11 Feb 2025 20:39:38 +0000 (21:39 +0100)
committerDominik Kaiser <dkaisr@proton.me>
Tue, 11 Feb 2025 20:39:38 +0000 (21:39 +0100)
README.org
init.el

index 86600672a27b84af3de9c877cd636d5f42cc2dfb..26e02fb2eaf17ce4251907d485cedd2ed003863d 100644 (file)
 #+begin_src elisp
   (use-package olivetti
     :bind ("C-c f" . olivetti-mode)
+    :hook
+    (org-mode . olivetti-mode)
+    (text-mode . olivetti-mode)
+    (prog-mode . olivetti-mode)
     :init
-    (setq-default olivetti-body-width 100)
-    (add-hook 'org-mode-hook #'olivetti-mode)
-    (add-hook 'text-mode-hook #'olivetti-mode))
+    (setq-default olivetti-body-width 90))
 #+end_src
 * Completion
 ** Ivy
diff --git a/init.el b/init.el
index 1a94009d7e2192aad70553d97c94a6333b4b2726..40f3e167e385331d1a6615239778c40327345f9f 100644 (file)
--- a/init.el
+++ b/init.el
 
 (use-package olivetti
   :bind ("C-c f" . olivetti-mode)
+  :hook
+  (org-mode . olivetti-mode)
+  (text-mode . olivetti-mode)
+  (prog-mode . olivetti-mode)
   :init
-  (setq-default olivetti-body-width 100)
-  (add-hook 'org-mode-hook #'olivetti-mode)
-  (add-hook 'text-mode-hook #'olivetti-mode))
+  (setq-default olivetti-body-width 90))
 
 (use-package ivy
   :bind (("C-s" . swiper)