customize faces for php-mode

This commit is contained in:
Yisroel Baum 2025-09-11 22:57:50 +03:00
parent 69fdf14c6b
commit 1a13930f31
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

19
init.el
View file

@ -62,14 +62,19 @@
:init :init
(vertico-mode)) (vertico-mode))
(use-package (use-package php-mode
php-mode :init
:init (setq phpactor-executable (executable-find "phpactor")) (setq phpactor-executable (executable-find "phpactor"))
:hook ((php-mode . eglot-ensure) :hook ((php-mode . eglot-ensure)
(php-mode . (lambda () (php-mode . (lambda ()
(setq-local phpactor-executable (setq-local phpactor-executable
(executable-find "phpactor"))))) (executable-find "phpactor"))))
:mode ("\\.php\\'")) (php-mode . my/php-mode-face-setup)) ;; Add custom face hook
:mode ("\\.php\\'")
:config
(defun my/php-mode-face-setup ()
(set-face-attribute 'php-method-call-traditional nil :foreground "goldenrod")
(set-face-attribute 'php-function-call-traditional nil :foreground "#708090")))
(use-package phpactor (use-package phpactor
:after php-mode) :after php-mode)