machine_setup/ansible/roles/emacs/files/elisp/lang-xml.el
2024-06-03 18:59:16 -04:00

18 lines
354 B
EmacsLisp

(defun xml-fmt ()
"Run xmllint --format."
(run-command-on-buffer "xmllint" "--format" "-")
)
(use-package nxml-mode
:commands (nxml-mode)
:pin manual
:ensure nil
:hook (
(nxml-mode . (lambda ()
(add-hook 'before-save-hook 'xml-fmt nil 'local)
))
)
)
(provide 'lang-xml)