More fontlock!
I increased fontlocking for c-mode and php-mode to also show certain operators like [] {} + - / -> => etc.
This commit is contained in:
parent
827f5efb0a
commit
16a98c0b6f
1 changed files with 17 additions and 0 deletions
17
emacs.d/10-font-lock.el
Normal file
17
emacs.d/10-font-lock.el
Normal file
|
@ -0,0 +1,17 @@
|
|||
(defun add-my-keywords (mode)
|
||||
(font-lock-add-keywords
|
||||
mode
|
||||
;; Currently support for [ ] | & ! . + = - / % * , ( ) < > { } ? : => ->
|
||||
'(("\\([\\[|.!+=&/%*,(){}:-]\\|\\]\\|\\ [><]\\ \\|[^<]\\?[^>]\\|\\=>\\)" 1 font-lock-operator-face)
|
||||
("\\(;\\)" 1 font-lock-end-statement))))
|
||||
|
||||
(add-my-keywords 'c-mode)
|
||||
(add-my-keywords 'php-mode)
|
||||
|
||||
(make-face 'font-lock-operator-face)
|
||||
(make-face 'font-lock-end-statement)
|
||||
(defvar font-lock-operator-face 'font-lock-operator-face)
|
||||
(defvar font-lock-end-statement 'font-lock-end-statement)
|
||||
|
||||
(set-face-foreground 'font-lock-operator-face "#EDD400")
|
||||
(set-face-foreground 'font-lock-end-statement "#888A85")
|
Loading…
Reference in a new issue