feat(format): add :lang racket formatter

This commit is contained in:
Ellis Kenyő 2022-08-16 21:24:57 +01:00 committed by Ellis Kenyo
parent d1697cb4d9
commit 7bdf8802a5
No known key found for this signature in database
GPG key ID: 298BE5D997EBAA02
2 changed files with 6 additions and 0 deletions

View file

@ -21,6 +21,7 @@
:dot ".")
(set-rotate-patterns! 'racket-mode
:symbols '(("#true" "#false")))
(set-formatter! 'raco-fmt '("raco" "fmt") :modes '(racket-mode))
(add-hook! 'racket-mode-hook
#'rainbow-delimiters-mode

View file

@ -9,3 +9,8 @@
(unless (executable-find "raco")
(warn! "Could not find raco executable; commands for install packages and build libraries will not work."))
(when (modulep! :editor format)
(unless (and (executable-find "raco")
(eq 0 (call-process-shell-command "raco fmt --help" nil nil)))
(warn! "Couldn't find raco fmt. Formatting will be disabled.")))