(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)
