mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Add nov.el
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
45511fabf2
commit
e7f90c4a87
54
emacs-lisp/nov_el.org
Normal file
54
emacs-lisp/nov_el.org
Normal file
|
@ -0,0 +1,54 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: e0db184f-a0a6-483f-bfea-6b98209491f9
|
||||
:END:
|
||||
#+title: Nov.el
|
||||
#+filetags: emacs-load
|
||||
Load ~nov.el~ and it's undeclared dependency ~esxml~.
|
||||
|
||||
#+begin_src emacs-lisp :noweb yes
|
||||
(use-package esxml
|
||||
:straight t
|
||||
:after visual-fill-column
|
||||
:init
|
||||
<<define-center-hook>>
|
||||
<<hook-epub>>
|
||||
:hook
|
||||
<<hook-visual-fill-column>>
|
||||
<<hook-nov-mode-center>>
|
||||
:config
|
||||
<<disable-text-filling>>)
|
||||
|
||||
(use-package nov
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-epub
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
:mode ("\\.py\\'" . nov-mode)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-visual-fill-column
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(nov-mode . visual-fill-column-mode)
|
||||
(nov-mode . visual-line-mode)
|
||||
#+end_src
|
||||
|
||||
#+name: disable-text-filling
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq nov-text-width t)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-nov-mode-center
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(nov-mode . nov-mode-center)
|
||||
#+end_src
|
||||
|
||||
#+name: define-center-hook
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defun nov-mode-center ()
|
||||
(setq visual-fill-column-center-text t))
|
||||
#+end_src
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue