diff --git a/modules/lang/sml/config.el b/modules/lang/sml/config.el index 7a5d69e04..9755cd33e 100644 --- a/modules/lang/sml/config.el +++ b/modules/lang/sml/config.el @@ -4,6 +4,7 @@ :mode "\\.s\\(?:ml\\|ig\\)\\'" :config (set-repl-handler! 'sml-mode #'run-sml) + (set-formatter! 'smlformat '("smlformat") :modes '(sml-mode)) ;; don't auto-close apostrophes (type 'a = foo) and backticks (`Foo) (sp-with-modes 'sml-mode diff --git a/modules/lang/sml/doctor.el b/modules/lang/sml/doctor.el new file mode 100644 index 000000000..de483c420 --- /dev/null +++ b/modules/lang/sml/doctor.el @@ -0,0 +1,5 @@ +;;; lang/sml/doctor.el -*- lexical-binding: t; -*- + +(when (modulep! :editor format) + (unless (executable-find "smlformat") + (warn! "Couldn't find smlformat. Formatting will be disabled.")))