Docker: Followup for #15414: fix bindings not loading, add docs (#15707)

* [docker] Followup for #15414: Fix bindings not being added, add docs.

* [docker] Wrap `:config` block in a `progn`, as per CONVENTIONS.org.

* [docker] Fix key binding in documentation.

Co-authored-by: Tommi Komulainen <tkomulai+github@gmail.com>

Co-authored-by: Tommi Komulainen <tkomulai+github@gmail.com>
This commit is contained in:
Alfonso Montero 2022-08-27 10:42:12 +02:00 committed by GitHub
parent 244b8a8cb9
commit 99eb20e13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -74,6 +74,9 @@ auto-completion of the running containers.
| Key binding | Description |
|-------------+-------------------------------------------------------------------|
| ~SPC m c b~ | build current buffer |
| ~SPC m c B~ | build current buffer without cache |
| ~SPC a t d~ | entry point to interact with dockers, after that use ~?~ for help |
| ~SPC m b~ | build current buffer |
| ~SPC m B~ | build current buffer without cache |
| ~SPC m d~ | shortcut for ~docker.el~ main menu |
| ~SPC m i~ | shortcut for 'docker images' in the ~docker.el~ screen |
| ~SPC m p~ | shortcut for 'docker containers' in the ~docker.el~ screen |

View File

@ -50,14 +50,15 @@
:defer t
:init (add-hook 'dockerfile-mode-local-vars-hook #'spacemacs//docker-dockerfile-setup-backend)
:config
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
(if (null docker-dockerfile-backend) "b" "cb") 'dockerfile-build-buffer
(if (null docker-dockerfile-backend) "B" "cB") 'dockerfile-build-buffer-no-cache-buffer)
(with-eval-after-load 'docker
(progn
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
"d" 'docker
"i" 'docker-images
"p" 'docker-containers))))
(if (null docker-dockerfile-backend) "b" "cb") 'dockerfile-build-buffer
(if (null docker-dockerfile-backend) "B" "cB") 'dockerfile-build-buffer-no-cache-buffer)
(if (package-installed-p 'docker)
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
"d" 'docker
"i" 'docker-images
"p" 'docker-containers)))))
(defun docker/post-init-flycheck ()
(spacemacs/enable-flycheck 'dockerfile-mode))