Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper way to setting hydra-key-doc-function without affect other package's setting #405

Open
wztdream opened this issue Dec 28, 2021 · 0 comments

Comments

@wztdream
Copy link

I am using spacemacs, and by default spacemacs set hydra-key-doc-function to their own format

(defun spacemacs//hydra-key-doc-function (key key-width doc doc-width)
  "Custom hint documentation format for keys."
  (format (format "[%%%ds] %%%ds" key-width (- -1 doc-width))
          key doc))

But this will results annoying brackets if you use :column property in hyra, for example the code in hyra example will be:

(defhydra hydra-movement ()
  ("j" next-line "down" :column "Vertical")
  ("k" previous-line "up")
  ("l" forward-char "forward" :column "Horizontal")
  ("h" backward-char "back"))

image

We can solve this issue by setting hydra-key-doc-function to default value, but I think there is some "reason" for spacemacs to setting their own format. So here is the question is there any way to setting my own hyra format without break other package's setting, like the setting by spacemacs here?

@wztdream wztdream changed the title Proper way to setting hydra-key-doc-function without affect other packages setting Proper way to setting hydra-key-doc-function without affect other package's setting Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant