mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(language/xml): add xmllint formatter setup and bind to C-c C-f
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user