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

Search results are not highlighted #125

Closed
edvin opened this issue Oct 1, 2023 · 8 comments
Closed

Search results are not highlighted #125

edvin opened this issue Oct 1, 2023 · 8 comments

Comments

@edvin
Copy link

edvin commented Oct 1, 2023

After installing the catppuccin theme in spacemacs, it is impossible to distinguish the highlighted choice in certain scenarios, like for example by searching for a command with M-x. In the attached picture, choice no 4 is selected, and I suppose the background color should have changed to indicate that. I've tried changing every exposed color in the mocha palette, but none of the options seem to affect the choice highlight.

image

Compare to the default theme, there you can easily see the highlighted choice:

image

@edvin edvin changed the title Search results are not highlighted with mocha Search results are not highlighted Oct 2, 2023
@NamesCode
Copy link
Member

huh, I think we're missing some faces here. I'll check it out later this week, just need to fix my emacs install.

@WhoisDonlee
Copy link
Contributor

I'm not familiar with spacemacs, but to me it looks like catppuccin isn't loaded at all. Spacemacs probably has it's own way for setting a theme. Are you sure catppuccin is properly set?

@edvin
Copy link
Author

edvin commented Oct 15, 2023

Perhaps I'm doing it wrong, but I do see (most of) the colors. I configured this:

dotspacemacs-additional-packages '(catppuccin-theme)
dotspacemacs-themes '(catppuccin)

@WhoisDonlee
Copy link
Contributor

Are any of the faces displaying catppuccin colors? Either the theme is not set properly or something else is overriding the faces. Maybe try setting it interactively with load-theme and see if it displays the right colors.

@edvin
Copy link
Author

edvin commented Oct 17, 2023

Interesting - when I load the theme manually using load-theme I get this:

image

The colors (presumably) missing from the catppuccin theme is then the colors from the previous theme (doom-palenight, see the lime green text for example?). It really looks like there are some faces missing from the theme definition. I will try with a minimal config/without spacemacs layers asap to verify if it is some configuration of spacemacs that interferes.

@edvin
Copy link
Author

edvin commented Oct 17, 2023

I have confirmed that it's not a Spacemacs issue. This is a screenshot taken with a minimal emacs config:

image

The highlight background color etc is still missing. For completeness/reproducibility, this is the complete init.el:

(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 6))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'catppuccin-theme)
(load-theme 'catppuccin :no-confirm)

(straight-use-package 'helm)
(global-set-key (kbd "M-x") 'helm-M-x)

It just loads straight.el, catppuccin-theme and helm just to see the missing colors easily.

@WhoisDonlee
Copy link
Contributor

Ah, I get it now. Doomemacs uses vertico by default so probably most people stick with that.
You could either setup vertico, or add the helm faces. It looks like someone already did some work.

emacs/catppuccin-theme.el

Lines 588 to 617 in 89e4013

;; TODO: Theme helm
(helm-bookmark-w3m :foreground ,undef)
(helm-buffer-not-saved :foreground ,undef)
(helm-buffer-process :foreground ,undef)
(helm-buffer-saved-out :foreground ,undef)
(helm-buffer-size :foreground ,undef)
(helm-candidate-number :foreground ,undef)
(helm-ff-directory :foreground ,undef)
(helm-ff-dotted-directory :foreground ,undef)
(helm-ff-executable :foreground ,undef)
(helm-ff-file :foreground ,undef)
(helm-ff-invalid-symlink :foreground ,undef)
(helm-ff-prefix :foreground ,undef)
(helm-ff-symlink :foreground ,undef)
(helm-grep-cmd-line :foreground ,undef)
(helm-grep-file :foreground ,undef)
(helm-grep-finish :foreground ,undef)
(helm-grep-lineno :foreground ,undef)
(helm-grep-match :inherit match)
(helm-grep-running :foreground ,undef)
(helm-header :foreground ,undef)
(helm-moccur-buffer :foreground ,undef)
(helm-selection :underline nil)
(helm-selection-line)
(helm-separator :foreground ,undef)
(helm-source-go-package-godoc-description :foreground ,undef)
(helm-source-header :foreground ,undef)
(helm-time-zone-current :foreground ,undef)
(helm-time-zone-home :foreground ,undef)
(helm-visible-mark :foreground ,undef)

(straight-use-package 'vertico)
(use-package vertico
  :init
  (vertico-mode))

@edvin
Copy link
Author

edvin commented Oct 21, 2023

Perfect, thank you :)

@edvin edvin closed this as completed Oct 21, 2023
@lunacd lunacd mentioned this issue Mar 30, 2024
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

3 participants