Lem
GitHubDiscord Matrix Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Transient help popup

A transient is a text pop-up window, displaying at the bottom of the screen, that shows keybindings and their associated commands.

The pop-up can stay in place when the user presses a key, which allows to always show help on-screen.

Simple example

  (define-command example-command () ()
    (message "example message"))

  (lem/transient:define-transient *demo-keymap-simple*
    :description "my demo keymap"
    (:key "a" :suffix 'example-command :description "demo prefix 1")
    (:key "b" :suffix 'example-command :description "demo prefix 2" :active-p nil))

  (define-key *global-keymap* "C-c t" *demo-keymap-simple*)

Show all current keybindings

Setting lem/transient:*transient-always-show* to t makes it show all available keybindings for the current mode(s):

(setf lem/transient::*transient-always-show* t)