feat(format): add :lang rst formatter

This commit is contained in:
Ellis Kenyo 2022-12-31 23:12:00 +00:00 committed by Yann Esposito (Yogsototh)
parent 2be3540009
commit a97b95de0c
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,9 @@
;;; lang/rst/config.el -*- lexical-binding: t; -*-
(use-package! sphinx-mode
:hook (rst-mode . sphinx-mode))
:hook (rst-mode . sphinx-mode)
:config
(set-formatter! 'rstfmt '("rstfmt") :modes '(rst-mode)))
(use-package! rst
:defer t

View file

@ -0,0 +1,5 @@
;;; lang/rst/doctor.el -*- lexical-binding: t; -*-
(when (modulep! :editor format)
(unless (executable-find "rstfmt")
(warn! "Couldn't find rstfmt. Formatting will be disabled.")))