Novaβ„’

Extensions


Readme

advanced PHP πŸ”₯

advanced PHP provides syntax highlighting for special PHP writing. It is also fully compatible with HTML, you don't need to switch between syntaxes.

Why, though? πŸ€”

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.

Language Support 🧩

advanced PHP currently supports the following features:

βœ… compatible with HTML

βœ… variable substitution

βœ… variable substitution with curly brackets

βœ… SQL recognition within strings

βœ… 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

advanced PHP:

With Varia Theme.

standard PHP-HTML:

With standard "Palette" theme.

Theming 🎨

(2020-11-20) The syntax works best with Varia Theme. πŸ’―

The syntax provides an easy way to improve the highlighting for theme developers.

Statics

advphp-base.static.condition { 
    /* if, else, elseif, foreach, ... */
}
advphp-base.static.processor { 
    /* echo, return, print, ... */
}
advphp-base.static.declaration {
    /* new, public, private, ... */
}
advphp-base.static.import {
    /* include, require, ... */
}
advphp-base.static.constant {
    /* __DIR__, __METHOD__, ... */
}
advphp-base.static.wordOperator {
    /* AND, OR, XOR, ... */
}

SQL Keywords

advphp-base.sql.keywords {
    /* SELECT, FROM, WHERE, ... */
}

Syntax

advphp-base.operator {
    /* +, -, /, >, ... */
}
advphp-base.bracket {
    /* [], {}, (), "", ... */
}
advphp-base.delimiter {
    /* , */
}

Variables

advphp-base.identifier.variable.prefix {
    /* $ */
}
advphp-base.identifier.variable.name {
    /* $variable */
}
advphp-base.identifier.variable.this {
    /* $this */
}

Functions

advphp-base.identifier.function.keyword {
    /* function */
}
advphp-base.identifier.function.name {
    /* my_function() */
}
advphp-base.identifier.parameter.prefix {
    /* my_function($parameter) {} */
}
advphp-base.identifier.parameter.name {
    /* my_function($parameter) {} */
}

Objects

advphp-base.identifier.object.name {
    /* Object:: */
}

Strings

advphp-base.string,
advphp-base.value.string,
advphp-base.string.doubleQuote,
advphp-base.string.singleQuote, {
    /* "string", 'string' */
}

advphp-base.string.backTic {
    /* `string` */
}

Contribution 🀝

This is my first extension for Nova or any other IDE. So, if you feel to improve things, then you are more than welcome. πŸ˜…


Changelog

Version 1.1.0

New Features:

  • SQL recognition within strings

Version 1.0.1

  • README changes

Version 1.0.0

Issue Fixes:

  • commenting shortcut PHP within HTML
  • selecting variable with prefix at double-click
  • escaping characters within double-quotes

New Features:

  • PHP suggestions
  • better completions
  • hierarchy subtree
  • extended keywords list
  • function folding

Version 0.9.0 (Beta)

  • initial build

License

MIT License

Copyright (c) 2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.