feat(format): add :tools docker formatter

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

View file

@ -2,6 +2,7 @@
(after! dockerfile-mode (after! dockerfile-mode
(set-docsets! 'dockerfile-mode "Docker") (set-docsets! 'dockerfile-mode "Docker")
(set-formatter! 'dockfmt '("dockfmt" "fmt" filepath) :modes '(dockerfile-mode))
(when (modulep! +lsp) (when (modulep! +lsp)
(add-hook 'dockerfile-mode-local-vars-hook #'lsp! 'append))) (add-hook 'dockerfile-mode-local-vars-hook #'lsp! 'append)))

View file

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