feat(language/xml): add xmllint formatter setup and bind to C-c C-f

This commit is contained in:
2023-09-13 15:16:39 +01:00
parent d479a19699
commit d405e962da

View File

@@ -13,6 +13,10 @@
:defer t
:hook (nxml-mode . siren-xml-setup)
:general
(:keymaps 'nxml-mode-map
"C-c C-f" 'xmllint-format-buffer)
:custom
(nxml-attribute-indent 2)
(nxml-child-indent 2)
@@ -20,7 +24,13 @@
:preface
(defun siren-xml-setup ()
(run-hooks 'prog-mode-hook)
(setq-local tab-width 2)))
(setq-local tab-width 2))
:config
(reformatter-define xmllint-format
:program "xmllint"
:args '("--format" "-")
:lighter " XMLlint"))
(provide 'siren-xml)
;;; siren-xml.el ends here