diff --git a/modules/lang/data/config.el b/modules/lang/data/config.el index 45ec4f6b1..24498563e 100644 --- a/modules/lang/data/config.el +++ b/modules/lang/data/config.el @@ -8,7 +8,9 @@ (setq nxml-slash-auto-complete-flag t nxml-auto-insert-xml-declaration-flag t) (set-company-backend! 'nxml-mode '(company-nxml company-yasnippet)) - (setq-hook! 'nxml-mode-hook tab-width nxml-child-indent)) + (setq-hook! 'nxml-mode-hook tab-width nxml-child-indent) + (when (executable-find "xmllint") + (set-formatter! 'xmllint '("xmllint" "--format" "-") :modes '(nxml-mode)))) ;;;###package csv-mode diff --git a/modules/lang/data/doctor.el b/modules/lang/data/doctor.el new file mode 100644 index 000000000..b18eb5d54 --- /dev/null +++ b/modules/lang/data/doctor.el @@ -0,0 +1,5 @@ +;;; lang/data/doctor.el -*- lexical-binding: t; -*- + +(when (modulep! :editor format) + (unless (executable-find "xmllint") + (warn! "Couldn't find xmllint. Formatting will be disabled.")))