feat(format): add :lang sml formatter

This commit is contained in:
Ellis Kenyő 2022-08-17 07:51:34 +01:00 committed by Ellis Kenyo
parent d8dc579fcb
commit 7b46177d19
No known key found for this signature in database
GPG key ID: 298BE5D997EBAA02
2 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,7 @@
:mode "\\.s\\(?:ml\\|ig\\)\\'" :mode "\\.s\\(?:ml\\|ig\\)\\'"
:config :config
(set-repl-handler! 'sml-mode #'run-sml) (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) ;; don't auto-close apostrophes (type 'a = foo) and backticks (`Foo)
(sp-with-modes 'sml-mode (sp-with-modes 'sml-mode

View file

@ -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.")))