Skip to content

Commit

Permalink
Docker: Followup for syl20bnr#15414: fix bindings not loading, add do…
Browse files Browse the repository at this point in the history
…cs (syl20bnr#15707)

* [docker] Followup for syl20bnr#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>
  • Loading branch information
pataquets and tko authored Aug 27, 2022
1 parent 244b8a8 commit 99eb20e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
7 changes: 5 additions & 2 deletions layers/+tools/docker/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
15 changes: 8 additions & 7 deletions layers/+tools/docker/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 99eb20e

Please sign in to comment.