FUCK THIS SHIT!
No, really. It just hallucinated a non-existent package, with such a confidence lmao
Yes, yes, I know, it cannot know anything about “existence”, but at least these dorks do not “deserve” the exuberant money they got paid.
Uniform Code Block Rendering in Eww and Shr To get syntax highlighting in eww and shr, you need to use a package that intercepts <code> and <pre> tags and applies Emacs’s built-in font-locking. The eww-code-blocks-mode is a good choice for this.
Code snippet
;; Enable eww-code-blocks-mode for eww and shr (use-package eww-code-blocks :straight t :config (add-hook ’eww-after-render-hook #’eww-code-blocks-mode) (add-hook ‘shr-after-render-hook #’eww-code-blocks-mode))
;; Customize the appearance of code blocks in eww/shr (custom-set-faces ‘(eww-code ((t (:foreground “#f8f8f2” :background “#282a36”)))))
This configuration uses the eww-code-blocks package to automatically detect code blocks in eww and shr buffers and apply syntax highlighting. The custom-set-faces part ensures that the code blocks have a consistent color scheme, in this example, the Dracula theme colors.