You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i think you could make the docs much clearer on how to set up custom actions and keymaps.
i'm just learning embark, so not the person to do it. i got it working but it took some struggling to understand.
it seems like a few simple steps are required:
create a keymap (as per clear code example in the docs: use defvar-keymap)
create some actions (commands), taking a target as only argument, and add them to your keymap. (easy done)
add a target type (in the docs kinda but pretty unclear):
;; in your parent consult function:
(consult--read candidates
:category'your-target-type)
your-target-type here is a consult category, and also creates an embark target type, right? Worth emphasizing! Two different concepts from two libraries are fused here.
Maybe there are other ways to also create target types?
add a cons cell of target type and keymap to embark-keymap-alist (in the docs but format unclear):
That is, the consult category created above, which is also your target type, must be the car of your cons cell here. If you don't do that, your cons cell here will be meaningless.
Do I have that right? I feel like it'd be good to put the steps together in a simple list for others.
Apols if I missed the info somewhere in the docs.
The text was updated successfully, but these errors were encountered:
i think you could make the docs much clearer on how to set up custom actions and keymaps.
i'm just learning embark, so not the person to do it. i got it working but it took some struggling to understand.
it seems like a few simple steps are required:
create a keymap (as per clear code example in the docs: use
defvar-keymap
)create some actions (commands), taking a target as only argument, and add them to your keymap. (easy done)
add a target type (in the docs kinda but pretty unclear):
your-target-type
here is a consult category, and also creates an embark target type, right? Worth emphasizing! Two different concepts from two libraries are fused here.Maybe there are other ways to also create target types?
embark-keymap-alist
(in the docs but format unclear):the format is
That is, the consult category created above, which is also your target type, must be the car of your cons cell here. If you don't do that, your cons cell here will be meaningless.
Do I have that right? I feel like it'd be good to put the steps together in a simple list for others.
Apols if I missed the info somewhere in the docs.
The text was updated successfully, but these errors were encountered: