2016-10-18 4 views
0
AC (автозавершения)

Как изменить цвет dabbrev AC (автозавершения) Я пытался изменить эти цвета на моем init.elКак изменить цвет dabbrev

(set-face-attribute 'ac-dabbrev-menu-face nil :inherit ac-candidate-face :foreground nil) 
(set-face-attribute 'ac-dabbrev-selection-face nil :inherit ac-selection-face :background nil) 
(set-face-attribute 'ac-etags-candidate-face nil :foreground nil) 
(set-face-attribute 'ac-etags-selection-face nil :background nil) 

Но это не работает и дал мне такую ​​ошибку. Пожалуйста, дайте мне знать, если есть способ сделать это.

PS: Я использую «monokai-тему», которая обеспечивает лицо переменного кандидата/выбор лица

ответ

1

Предполагая, что вы используете новую тему API (вероятно), используйте custom-theme-set-faces. Я просто вставляю свои настройки, потому что я слишком ленив, чтобы проверить их. Я не совсем уверен, что делает атрибут nil.

(load-theme 'calmer-forest 'noconfirm) 
    (custom-theme-set-faces 
    'calmer-forest 

    '(ac-completion-face ((t (:foreground "green3")))) 
    '(ac-selection-face ((t (:background "gray9" :foreground "magenta")))) 
    '(ac-candidate-face ((t (:background "gray16" :foreground "lavender")))) 
    '(ac-gtags-selection-face ((t (:inherit ac-selection-face)))) 
    '(ac-gtags-candidate-face ((t (:inherit ac-candidate-face)))) 
    '(ac-yasnippet-selection-face ((t (:inherit ac-selection-face)))) 
    '(ac-yasnippet-candidate-face ((t (:inherit ac-candidate-face)))) 
))