Emacs has a lot of built-in keybindings and users can define
more. They can be long. This commit installs which-key and
transient which help when entering long keybindings.
(list "bash/.config/profile.d/50-notmuch.sh"
"emacs/.config/emacs/conf/conf-email.el")))))
+(define emacs-keys-service
+ (service home-program-service-type
+ (home-program-configuration
+ (packages
+ (list emacs-transient
+ emacs-which-key))
+ (dotfiles
+ (list "emacs/.config/emacs/conf/conf-keys.el")))))
+
(define emacs-package-service
(service home-program-service-type
(home-program-configuration
emacs-dired-service
emacs-document-service
emacs-email-service
+ emacs-keys-service
emacs-package-service
emacs-pass-service
emacs-service))
--- /dev/null
+;; Copyright (c) 2022 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; conf-keys.el - configuration for keybinding completion.
+
+(require 'conf-package)
+
+(use-package which-key
+ :ensure t
+ :init
+ ;; Enable everywhere.
+ ;; `which-key-mode' is an autoload.
+ (which-key-mode)
+ :custom
+ (which-key-idle-delay 0.3)
+ (which-key-max-description-length 25)
+ (which-key-separator " ")
+ ;; Sort entries alphabetically.
+ (which-key-sort-order 'which-key-key-order-alpha)
+ :config
+ (which-key-setup-side-window-bottom))
+
+(use-package transient
+ :commands
+ (transient-define-prefix)
+ :ensure t)
+
+(provide 'conf-keys)