diff --git a/flakes/emacs/config/init.el b/flakes/emacs/config/init.el index 94d4479..cb224eb 100644 --- a/flakes/emacs/config/init.el +++ b/flakes/emacs/config/init.el @@ -748,6 +748,20 @@ ("DEL" . vertico-directory-delete-char) ("M-DEL" . vertico-directory-delete-word))) +(use-package visual-wrap + :ensure nil + :preface + (defun to/enable-code-wrap () + "Wrap long code lines with context-aware continuation indentation." + (setq-local truncate-lines nil) + (setq-local truncate-partial-width-windows nil) + (setq-local word-wrap t) + (setq-local visual-wrap-extra-indent 0) + (visual-wrap-prefix-mode 1)) + :hook + ((prog-mode . to/enable-code-wrap) + (conf-mode . to/enable-code-wrap))) + (use-package vterm :defer 2 :if module-file-suffix)