feat(format): add :lang rst formatter

This commit is contained in:
Ellis Kenyo 2022-12-31 23:12:00 +00:00
parent 7bdf8802a5
commit caa6b2bb3b
No known key found for this signature in database
GPG key ID: 298BE5D997EBAA02
2 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,9 @@
;;; lang/rst/config.el -*- lexical-binding: t; -*- ;;; lang/rst/config.el -*- lexical-binding: t; -*-
(use-package! sphinx-mode (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 (use-package! rst
:defer t :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.")))