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

Feature request: colors for which-key #42

Open
Kabouik opened this issue Nov 6, 2022 · 1 comment
Open

Feature request: colors for which-key #42

Kabouik opened this issue Nov 6, 2022 · 1 comment

Comments

@Kabouik
Copy link

Kabouik commented Nov 6, 2022

I first came across your emacs work with nano-emacs but now found out about nano-theme too. It be easier to integrate with my pre-existing configuration (fewer conflicting options), so I am considering using it instead of the full nano-emacs suite. On nano-emacs, I was able to add two different color schemes for which-key for both themes (see example below for nano-theme-light.el):

(defun nano-theme-set-light ()
  "Apply light Nano theme base."
  ;; Colors from Material design at https://material.io/
  (setq frame-background-mode    'light)
  (setq nano-color-foreground "#37474F") ;; Blue Grey / L800
  (setq nano-color-background "#FFFFFF") ;; White
  (setq nano-color-highlight  "#FAFAFA") ;; Very Light Grey
  (setq nano-color-critical   "#FF6F00") ;; Amber / L900
  (setq nano-color-salient    "#673AB7") ;; Deep Purple / L500
  (setq nano-color-strong     "#000000") ;; Black
  (setq nano-color-popout     "#FFAB91") ;; Deep Orange / L200
  (setq nano-color-subtle     "#ECEFF1") ;; Blue Grey / L50
  (setq nano-color-faded      "#B0BEC5") ;; Blue Grey / L200
  (setq nano-theme-var "light")          ;; To allow theme switching
  (custom-set-faces
   '(which-key-command-description-face ((t (:foreground "#b0bec5"))))
   '(which-key-group-description-face ((t (:foreground "#673ab7"))))
   '(which-key-key-face ((t (:foreground "#37474f"))))
   '(which-key-local-map-description-face ((t (:foreground "#673ab7"))))
   '(which-key-separator " ")))

However it seems themes do not work the same way in nano-theme and I was not able to replicate my custom changes to add the two color schemes for which-key. Without those changes, which-key shows up with mismatching colors at best, or is not legible at worst. I would be happy to submit a PR but to be honest I couldn't figure out something working so far. If I understand correctly, the two themes in nano-theme include presets for several popular packages with nano-theme-support.el. Would it be possible to add support for which-key?

I believe which-key is a very convenient package for new emacs users who don't know many keybindings yet, and it might be relevant to support it because a good proportion of nano-theme users might also be newcomers who want to quickly escape the ugly default emacs theme, and get some beautiful configuration before knowing how to do all the hard work by themselves.

@rougier
Copy link
Owner

rougier commented Nov 28, 2022

Integration with nano theme should be easier actually. You can make a PR with your proposed changes (possibly with a screenshot) and I'll merge it. It's mostly a matter of adding the 4 which key faces.

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

2 participants