merge: pull request #6369 from elken/feature/editor-format-refactor

This commit is contained in:
Henrik Lissner 2023-09-14 01:19:01 +02:00 committed by GitHub
commit a234d8e9c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
89 changed files with 526 additions and 728 deletions

View file

@ -40,6 +40,7 @@ installed and accessible from your PATH.
Optionally, this module also uses the following programs:
- =docker-langserver= (for LSP users): ~$ npm install -g
dockerfile-language-server-nodejs~
- =dockfmt= for [[doom-module::editor format]]: https://github.com/jessfraz/dockfmt#installation
* TODO Usage
#+begin_quote

View file

@ -2,6 +2,7 @@
(after! dockerfile-mode
(set-docsets! 'dockerfile-mode "Docker")
(set-formatter! 'dockfmt '("dockfmt" "fmt" filepath) :modes '(dockerfile-mode))
(when (modulep! +lsp)
(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.")))