ianyepan / vscode-dark-plus-emacs-theme

An accurate port of the default Visual Studio Code Dark+ theme for Emacs
GNU General Public License v3.0
175 stars 17 forks source link

Ivy Mini-Buffer Sub-expression Matches are not Uniquely Highlighted #11

Closed brownts closed 3 years ago

brownts commented 3 years ago

Currently all of the ivy-minibuffer-match-face-X faces are defined as the same value.

   `(ivy-minibuffer-match-face-1              ((t (:inherit isearch))))
   `(ivy-minibuffer-match-face-2              ((t (:inherit ivy-minibuffer-match-face-1))))
   `(ivy-minibuffer-match-face-3              ((t (:inherit ivy-minibuffer-match-face-2))))
   `(ivy-minibuffer-match-face-4              ((t (:inherit ivy-minibuffer-match-face-2))))

This means that sub-expressions are not shown uniquely for the entire match, and instead the entire match is colored the same. The different coloring that is expected for the sub-expression matching is demonstrated here.

It would appear that the ivy-minibuffer-match-face-2, 3 and 4 faces should be changed so that this functionality is restored.

ianyepan commented 3 years ago

Hi @brownts thanks for the feedback! Actually, the decision was intentional, as I feel it wouldn't match the Visual Studio Code-style UI as closely if we have a rather "colourful" ivy minibuffer. If you really need this feature, may I kindly suggest putting that in your own config with set-face-attribute? Cheers! Closing issue for now, please reopen if you disagree or have anything else to add!

brownts commented 3 years ago

Thanks for the response. I understand that not everyone would want that.

I ended up modifying the face and selecting colors which were within the VS Code Dark+ palette, as I had the same concern as you...that it wouldn't match the style. I just flipped the background and foreground colors so that it would be noticeable, but still within the palette. In case anyone looks here in the future, the following is what I used for this:

(use-package vscode-dark-plus-theme
  :ensure t
  :custom-face
  (ivy-minibuffer-match-face-2
   ((t (:inherit default
                 :background "#6A9955" ; ms-green
                 :foreground "#1e1e1e" ; default background color
                 :weight bold))))
  (ivy-minibuffer-match-face-3
   ((t (:inherit default
                 :background "#4EC9B0" ; ms-bluegreen
                 :foreground "#1e1e1e" ; default background color
                 :weight bold))))
  (ivy-minibuffer-match-face-4
   ((t (:inherit default
                 :background "#C586C0" ; ms-magenta
                 :foreground "#1e1e1e" ; default background color
                 :weight bold))))
  :config (load-theme 'vscode-dark-plus t))