-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add individual faces #606
Open
minikN
wants to merge
29
commits into
emacs-php:master
Choose a base branch
from
minikN:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add individual faces #606
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zonuexe
reviewed
Mar 1, 2020
@@ -117,7 +117,7 @@ | |||
:tag "PHP Increment/Decrement Op") | |||
|
|||
(defface php-string-op '((t (:inherit php-operator))) | |||
"PHP Mode face used to logical operators (.)." | |||
"PHP Mode face used to string operator (.)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Merged
Merged
Is this still being worked on? Just wondering. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, this PR is adding a lot of new faces to php-mode. Let me explain what I have added.
The following faces (and accompanying regex) have been added:
Classes
php-class-declaration
: will fontify the wordsclass
,trait
,interface
.php-class-declaration-spec
: will fontify the wordsimplements
,extends
.php-namespace-declaration
: will fontify the wordnamespace
.php-import-declaration
: will fontify the wordsuse ... as ...
.php-class-modifier
: will fontifyabstract
,final
keywords in class declaration.Methods
php-method-modifier
: will fontifyabstract
,final
keywords in method declaration.php-method-access
: will fontifyprivate
,protected
,public
in method declaration.php-method-static
: will fontifystatic
keyword in method declaration.php-return-type-colon
: will fontify:
in front of return type declaration.Properties
php-property-access
: will fontifyprivate
,protected
,public
in property declaration.php-property-static
: will fontifystatic
keyword in property declaration.php-property-const
: will fontifyconst
keyword in property declaration.Statements
php-block-statement
: will fontifyif
,elseif
,for
,foreach
,while
,declare
,switch
andcatch
keywords.php-flow-control-statement
: will fontifybreak
,continue
,die
,exit
,goto
,return
andthrow
keywords.php-print-statement
: will fontifyecho
,print
andvar_dump
keywords.php-include-statement
: will fontifyinclude
,include_once
,require
andrequire_once
keywords.Other Stuff
php-constant-keyword
: will fontifytrue
,false
andnull
.php-function-keyword
: will fontifyfunction
in... function name(...
.php-number
: will fontify integers and floats (13
,4.3
,...
)php-string-quote
: will fontify the string delimiters ('
,"
)php-block-delimiter
: will fontify block delimiters ((
,[
,{
,)
,]
,}
)php-type-operator
: will fontifyinsteadof
andinstanceof
keywords.php-string-op
: will fontify.
for string concatenation. I also bootstrapped that in my last PR but somehow forgot to actually implement it.Default styles
The faces
php-type-operator
,php-block-delimiter
andphp-number
inherit fromdefault
.The face
php-string-quote
inherits fromphp-string
.All other faces inherit from
php-keyword
So by default, everything should look the same.
Known issues
php-string-qoute
in comparison tophp-string
, occurences of string delimiters inside of the string will also be colored differently.insteadof
is no type operator and therefore should not have been grouped in thetype-operator
face. However, since it's so similar toinstanceof
I put it in anyway.