doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
18.88k stars 3.03k forks source link

which-key descriptions not being replaced after rebinding #7887

Open yaaama opened 2 weeks ago

yaaama commented 2 weeks ago

I confirm that...

I have seen others raise issues on this before but the solutions don't seem to work for me, maybe I am missing something

Expected behavior

I want to rebind some keys that are occupied by module specific functions that I have not enabled, but the whichkey descriptions are not updating.

I am trying different ways of rebinding and I can't seem to figure it out, I have tried which-key-add.... functions and unbinding the keys first to try replacing it manually but to no avail.

Here are a few of the permutations I have tried:

(map! :desc "Dict at pt search" :leader "s t" #'+dict/describe-word-at-pt
      :desc "Dict Search" :leader "s T" #'+dict/describe-word)

(map! :leader :prefix "s"
      :desc "Dict at pt search" "t" #'+dict/describe-word-at-pt
      :desc "Dict Search" "T" #'+dict/describe-word)

(map! :leader
      :prefix ("s" . "search")
      :desc "Dict at pt search" "t" #'+dict/describe-word-at-pt
      :desc "Dict Search" "T" #'+dict/describe-word)

(map! :map doom-leader-map
      :desc "Dict at pt search" "s t" #'+dict/describe-word-at-pt
      :desc "Dict Search" "s T" #'+dict/describe-word)

I wanted to mention that this has been a problem for a while now and I have only gotten around to trying to investigate the problem just now (hence why the example I gave above is silly as the <leader> s t keys already map to a description about "Dictionaries").

Thank you

Current behavior

The which key descriptions continue to say "Dictionary" and "Thesaurus"

Steps to reproduce

Rebind the leader map keys

System Information

https://pastebin.com/f4Ld7vgL