Browse Source

nov.el tweaks

master
Nicolas Petton 10 months ago
parent
commit
deb9e8b6ba
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
1 changed files with 2 additions and 30 deletions
  1. +2
    -30
      init.el

+ 2
- 30
init.el View File

@ -550,38 +550,10 @@ be global."
(defun my-nov-font-setup ()
(face-remap-add-relative 'variable-pitch
:family "Gentium Book Basic"
:height 1.5))
:height 1.3))
(add-hook 'nov-mode-hook 'my-nov-font-setup)
(require 'justify-kp)
(setq nov-text-width 62)
(defun my-nov-window-configuration-change-hook ()
(my-nov-post-html-render-hook)
(remove-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
t))
(defun my-nov-post-html-render-hook ()
(if (get-buffer-window)
(let ((max-width (pj-line-width))
buffer-read-only)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(when (not (looking-at "^[[:space:]]*$"))
(goto-char (line-end-position))
(when (> (shr-pixel-column) max-width)
(goto-char (line-beginning-position))
(pj-justify)))
(forward-line 1))))
(add-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
nil t)))
(add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)))
(setq nov-text-width 62)))
(use-package omnisharp
:after csharp-mode


Loading…
Cancel
Save