diff options
| author | 2025-12-22 14:39:56 -0800 | |
|---|---|---|
| committer | 2025-12-22 15:59:43 -0800 | |
| commit | ea20080f5ce3a4e7f87455308afc30d21d5a8a24 (patch) | |
| tree | 6878918d5a1c2849ed71c5534e34ae1cae209aba /oni-php | |
| parent | a48053a15309e92cc3e4e4fa350ffd89221cdb31 (diff) | |
| download | emacs-config-ea20080f5ce3a4e7f87455308afc30d21d5a8a24.tar.gz emacs-config-ea20080f5ce3a4e7f87455308afc30d21d5a8a24.zip | |
oni-php: Add rainbow-identifiers mode
Diffstat (limited to 'oni-php')
| -rw-r--r-- | oni-php/oni-php.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el index 22e3ef5..e631d72 100644 --- a/oni-php/oni-php.el +++ b/oni-php/oni-php.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2025.0415.154414 -;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra oni-smartparens ggtags fic-mode company-php rainbow-delimiters) +;; Version: 2025.1222.143742 +;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra oni-smartparens ggtags fic-mode company-php rainbow-delimiters rainbow-identifiers) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -70,6 +70,13 @@ nil for some reason." (setq-local comment-auto-fill-only-comments t) (auto-fill-mode)) +(defun oni-php-set-rainbow-identifier-faces () + "Set the faces to override for ‘rainbow-identifiers-mode’." + (setq-local rainbow-identifiers-faces-to-override + '(font-lock-type-face php-property-name php-function-call-traditional + php-doc-variable-sigil php-method-call-traditional + php-variable-sigil php-variable-name))) + (defun oni-php-add-use (class) "Try to add a use statement for CLASS under point." (interactive (list (symbol-name (symbol-at-point)))) @@ -148,7 +155,9 @@ Otherwise call FUNC with ARGS. This is meant as advice around (add-hook 'php-mode-hook 'flycheck-mode) (add-hook 'php-mode-hook 'ggtags-mode) (add-hook 'php-mode-hook 'oni-php--auto-fill-mode) +(add-hook 'php-mode-hook 'oni-php-set-rainbow-identifier-faces) (add-hook 'php-mode-hook 'rainbow-delimiters-mode) +(add-hook 'php-mode-hook 'rainbow-identifiers-mode) (add-hook 'php-mode-hook 'smartparens-mode) (add-hook 'php-mode-hook 'subword-mode) (add-hook 'php-mode-hook 'yas-minor-mode) |
