diff --git a/config.el b/config.el index d979c3c..952de6b 100644 --- a/config.el +++ b/config.el @@ -118,21 +118,20 @@ (elfeed-protocol-enable) (add-hook! 'elfeed-search-mode-hook 'elfeed-update) ;; Use different font and show article in fullscreen - (setq elfeed-show-mode-hook - (lambda () - (set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family "Bitter" :size 28)) - (setq fill-column 120) - (setq elfeed-show-entry-switch #'my-show-elfeed))) - (defun my-show-elfeed (buffer) - (with-current-buffer buffer - (setq buffer-read-only nil) - (goto-char (point-min)) - (re-search-forward "\n\n") - (fill-individual-paragraphs (point) (point-max)) - (setq buffer-read-only t) - (setq visual-fill-column-center-text t) - (visual-fill-column-mode 1)) - (switch-to-buffer buffer))) + (setq elfeed-show-entry-switch #'switch-to-buffer) + (defadvice! +rss-elfeed-wrap-h-nicer () + "Enhances an elfeed entry's readability by wrapping it to a width of +`fill-column' and centering it with `visual-fill-column-mode'." + :override #'+rss-elfeed-wrap-h + (setq-local truncate-lines nil + shr-width 160 + visual-fill-column-center-text t + default-text-properties '(line-height 1.1)) + (let ((inhibit-read-only t) + (inhibit-modification-hooks t)) + (visual-fill-column-mode) + (setq-local shr-current-font '(:family "Bitter" :height 1.1)) + (set-buffer-modified-p nil)))) ;; Set up the mail stack (after! mu4e (load! "+mail")) ;; HACK Enable AOT native compilation @@ -149,3 +148,5 @@ (setq lsp-pyright-use-library-code-for-types nil)) ;; Set indentation level to 2 (setq tab-width 2) +;; Set up nix LSP support +(add-hook 'nix-mode-local-vars-hook #'lsp!)