问两个自定义face的颜色的问题,我找不到地方

m-x执行 customize-face,然后company,按tab,出来的界面里面,我输入toolip,希望这个半透明的般的背景可以自定义,我在face里面找了n久,没发现地方

还有一个是helm里面的,这个红色框框出来的地方,是helm带的,我这个颜色也找了很多地方,没找到

这是我找到的地方

;; 选中的颜色
(set-face-attribute 'helm-selection nil
                    :background "#65a7e2"
                    :foreground "white")

;; helm最顶部的颜色
(set-face-attribute 'helm-header nil
                    :foreground "#4d4d4d"
                    :background "gray")

;; 头部的蓝底黑字
(set-face-attribute 'helm-source-header nil
                    :height 1
                    :foreground "black"
                    :background "#00629c")

;; 带.的目录
(set-face-attribute 'helm-ff-dotted-directory nil
                    :foreground "orange"
                    :background nil)

;; 目录显示颜色
(set-face-attribute 'helm-ff-directory nil
                    :foreground "#2b8bd2"
                    :background nil)

;; 文件显示颜色
(set-face-attribute 'helm-ff-file nil
                    :foreground "#2b8bd2"
                    :background nil)

;; 搜索找到的地方
(set-face-attribute 'helm-moccur-buffer nil
                    :foreground "#2b8bd2"
                    :background nil)

;; 结果数目
(set-face-attribute 'helm-candidate-number nil
                    :foreground "#2b8bd2"
                    :background nil)

第一个直接到你所使用的 M-x 的源代码找,肯定能找到,显然你用的不是 Emacs 自带的。(猜测为 swiper-match-face-2,默认用的 isearch match 时的 face)。第二个,你标注的地方是 Buffer Name,是 mode-line-buffer-id face。

1 个赞

太帅了,我找了半天,一句话解决,膜拜

第一个我看了swiper的源码,试了swiper-match-face-1到4,还有swiper-line-face,但是都是上面部分,没有效果

(defface swiper-match-face-1
  '((t (:inherit isearch-lazy-highlight-face)))
  "The background face for `swiper' matches.")

(defface swiper-match-face-2
  '((t (:inherit isearch)))
  "Face for `swiper' matches modulo 1.")

(defface swiper-match-face-3
  '((t (:inherit match)))
  "Face for `swiper' matches modulo 2.")

(defface swiper-match-face-4
  '((t (:inherit isearch-fail)))
  "Face for `swiper' matches modulo 3.")

(defface swiper-line-face
  '((t (:inherit highlight)))
  "Face for current `swiper' line.")

确实不是 swiper 的那个 face,而是 ivy-minibuffer-match-face-2


我没怎么用过 ivy/swiper/counsel,所以并不太清楚。

解决了,非常感谢大神