advanced PHP provides syntax highlighting for special PHP writing. It is also fully compatible with HTML, you don't need to switch between syntaxes.
Note: you need a compatible Theme, like Varia Theme, for proper highlighting.
Nova is a pretty editor with rich features, but it seems in lacking for language support *. Because I'm a long time Sublime Text 3 user I wanted to get some fresh air and started looking into Nova. Unfortunately all my projects looked horrible with the standard PHP-HTML syntax, so I started building this extension.
Nova is still fresh and can't compete in terms of extensions with other editors which are on the market for years now. But this for sure will change.
(*) Update: Nova released a lot of major updates since I developed this extension. I published it first when Nova 3 came out. Since Nova 7 they implemented most of the features I've developed in this extension, but my extension still fits my needs better.
To see how far they came I tried to get the same look with my Varia Theme for Nova's PHP and my advanced PHP highlighting. They're still some major differences. I focused more of the importance if strings and what kind of information they can hold. Also I tried to do a more logical separation of static keywords like: imports, processors, declarations, types and constants. I think when those features will be implement by Nova's standard PHP Syntax, my extension will be obsolete, but until then I will use it and try to improve it 😅
With Varia Theme:
With Varia Theme:
advanced PHP currently supports the following features:
✅ compatible with HTML
✅ variable substitution
✅ variable substitution with curly brackets
✅ SQL recognition within strings
✅ CURL-, WP-Constants
✅ separation between function parameters, arguments, variables and this
✅ separation between different elements like declarations, methods, variable prefixes etc.
✅ supports Nova's rainbow brackets option
✅ supports Nova's hierarchical subtree
✅ supports Nova's function folding
✅ offers completions and suggestions
The syntax provides an easy way to style the syntax for theme developers. As a theme developer please let me know if your theme supports "advanced PHP". ✌️
advphp.static.condition {
if, else, elseif, foreach, ...
}
advphp.static.processor {
echo, return, print, ...
}
advphp.static.declaration {
new, public, private, ...
}
advphp.static.import {
include, require, ...
}
advphp.static.constant {
__DIR__, __METHOD__, ...
}
advphp.static.wordOperator {
AND, OR, XOR, ...
}
advphp.wp.keywords {
ABSPATH, WP_ADMIN, ...
}
advphp.curl.keywords {
CURLOPT_HEADER, CURLOPT_PROXY, ...
}
advphp.sql.keywords {
SELECT, FROM, WHERE, ...
}
advphp.operator {
+, -, /, >, ...
}
advphp.bracket {
[], {}, (), "", ...
}
advphp.delimiter {
,
}
advphp.semicolon {
;
}
advphp.identifier.variable.prefix {
$
}
advphp.identifier.variable.name {
$variable
}
advphp.identifier.variable.this {
$this
}
advphp.identifier.function.keyword {
function
}
advphp.identifier.function.name {
my_function()
}
advphp.identifier.parameter.prefix {
my_function($parameter) {}
}
advphp.identifier.parameter.name {
my_function($parameter) {}
}
advphp.identifier.object.name {
Object::
}
advphp.definition.namespace {
Name\Space
}
advphp.string,
advphp.value.string,
advphp.string.doubleQuote,
advphp.string.singleQuote, {
"string", 'string'
}
advphp.string.backTic {
`string`
}
This is my first extension for Nova or any other IDE. So, if you feel to improve things, then you are more than welcome. 😅