syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.56k stars 4.9k forks source link

[compleseus] Use consult-theme from `theme-transient-state` #16387

Closed fnussbaum closed 1 month ago

fnussbaum commented 1 month ago

Unlike spacemacs/helm-themes, counsel-load-theme, and consult-theme, load-theme does not disable other themes when enabling one. It also does not provide previews. Hence we should use consult-theme from the theme-transient-state when the compleseus layer is used; this also makes the binding consistent with SPC T s.

Because consult uses the value of this-command to determine the :preview-key property, we need to customize the wrapper spacemacs/theme-loader too in order to enable previews.