emacs: add impatient-mode

This commit is contained in:
Erwin Boskma 2023-05-17 08:05:12 +02:00
parent f733280cc4
commit eff95c59f4
Signed by: erwin
SSH key fingerprint: SHA256:3F6Cm6I3erRqlBwEghZWAQl6eS5WrGTX1Vs/Evec1lQ

View file

@ -1108,6 +1108,24 @@ Prefer local packages from =node_modules= to global ones
(markdown-mode . lsp-deferred)) (markdown-mode . lsp-deferred))
#+end_src #+end_src
[[https://github.com/skeeto/impatient-mode][impatient-mode]] live renders HTML, but it can be made to work with Markdown with a custom filter
#+begin_src emacs-lisp
(use-package impatient-mode
:after markdown-mode
:config
(imp-set-user-filter 'markdown-filter))
(defun markdown-filter (buffer)
(princ
(with-temp-buffer
(let ((tmpname (buffer-name)))
(set-buffer buffer)
(set-buffer (markdown tmpname)) ; the function markdown is in `markdown-mode.el'
(buffer-string)))
(current-buffer)))
#+end_src
*** Elixir *** Elixir
Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]]. The =elixir-format= hook sets up the correct formatter configuration when in a =projectile= project. Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][elixir-mode]]. The =elixir-format= hook sets up the correct formatter configuration when in a =projectile= project.