NEON (Nette Object Notation; Neon format) is a custom configuration language similar to YAML.
Installation of IntelliJ NEON Nette Support is done through IntelliJ IDEA's integrated plugin manager. From within the application, open Preferences and select Plugins from the list on the left-hand side. This will show you the list of currently installed plugins. If you are currently using Neon free plugin then you must uninstall it before install NEON Nette Support.
Next, click the Marketplace tab, which allows you to browse through the plugins available on JetBrains' Marketplace. Enter "NEON" into the search field in the top left corner and select NEON Nette Support from the list. Finally, click the green Install button and restart the application. The plugin should now be installed, and you can set up your project.
20: test
Instead of:
"20": test
services:
- factory: Foo\Bar
setup:
key: [foo: 123, bar: 456]
Instead of:
services:
- factory: Foo\Bar
setup:
key:
foo: 123
bar: 456
XML configuration files for Neon plugin are files that contain information about extensions, parameters, services etc.
intellij-neon-pro.xml
in your project including vendor
folder or some other folders except ignored folders.intellij-neon-pro.xml
files. All will be loaded, but must have different value in vendor
attribute.intellij-neon-pro.xml
files with your Composer package.idea/intellij-neon-pro/xmlSources/Neon.xsd
if you are not in the root directory.
This is example file content with sample values:
myVendor/myPackage
to your unique vendor name<?xml version="1.0" encoding="UTF-8"?>
<neon vendor="myVendor/myPackage"
version="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=".idea/intellij-neon-pro/xmlSources/Neon.xsd">
<project>
<useExtension name="tracy" type="Tracy\Bridges\Nette\TracyExtension" />
</project>
<extensions>
<extension type="Tracy\Bridges\Nette\TracyExtension">
<schema>
<structure>
<field name="email">
<email />
<anyOf>
<listOf>
<value><email /></value>
</listOf>
</anyOf>
</field>
<field name="fromEmail"><email /></field>
<field name="emailSnooze"><string /></field>
<field name="logSeverity">
<useReusable ref="phpSeverity"/>
</field>
<field name="strictMode">
<useReusable ref="phpSeverity"/>
</field>
<field name="scream">
<useReusable ref="phpSeverity"/>
</field>
<field name="editor"><type value="string|null" /></field>
<field name="browser"><string /></field>
<field name="errorTemplate"><string /></field>
<field name="dumpTheme"><string /></field>
<field name="showBar"><bool /></field>
<field name="showLocation"><bool /></field>
<field name="maxLength"><int /></field>
<field name="maxDepth"><int /></field>
<field name="maxItems"><int /></field>
<field name="keysToHide">
<arrayOf>
<value><type value="string|int|null" /></value>
</arrayOf>
</field>
<field name="bar">
<listOf>
<value><type value="string|\Nette\DI\Definitions\Statement" /></value>
</listOf>
</field>
<field name="blueScreen"><callable /></field>
<field name="editorMapping" default="null">
<anyOf>
<null />
<arrayOf>
<key><string /><int /></key>
<value><string /></value>
</arrayOf>
</anyOf>
</field>
<field name="netteMailer"><bool /></field>
</structure>
</schema>
<services>
<service name="logger" type="\Tracy\ILogger"/>
<service name="blueScreen" type="\Tracy\BlueScreen"/>
<service name="bar" type="\Tracy\Bar"/>
</services>
</extension>
</extensions>
<reusables>
<reusable id="phpSeverity">
<anyOf>
<bool />
<int />
<string pattern="(E_(?:ALL|PARSE|STRICT|RECOVERABLE_ERROR|(?:CORE|COMPILE)_(?:ERROR|WARNING)|(?:USER_)?(?:ERROR|WARNING|NOTICE|DEPRECATED))|[ &|~()])+" />
<listOf>
<value><string pattern="E_(?:ALL|PARSE|STRICT|RECOVERABLE_ERROR|(?:CORE|COMPILE)_(?:ERROR|WARNING)|(?:USER_)?(?:ERROR|WARNING|NOTICE|DEPRECATED))" /></value>
</listOf>
</anyOf>
</reusable>
</reusables>
</neon>
This documentation describes the basic structure and constraints defined in the Neon XSD schema.
Attribute | Required | Default | Possible Values | Description |
---|---|---|---|---|
vendor |
yes | none | any string | Vendor name |
version |
yes | none | any int | Schema version |
Element | Required | Description |
---|---|---|
<project> |
no | Defines project-specific configurations |
<extensions> |
no | Defines extensions schema and services |
<reusables> |
no | Reusable configurations |
The <project>
element can contain the following sub-elements:
<useExtension>
: Specifies an extension to use (required attributes: name
, type
).<file>
: Specifies a file (required attributes: type
, path
).<parameters>
: Defines project parameters.The <extensions>
element defines available extensions. It contains one or more extension
sub-elements with the following attributes:
Attribute | Required | Default | Description |
---|---|---|---|
type |
yes | none | Type of the extension |
The <extension>
element can contain the following sub-elements:
<schema>
: Defines the structure of the extension configuration, allowing for nested fields and reusable types.<services>
: Specifies a list of services associated with the extension, including their names and types.An example is provided above.
The <reusables>
element defines reusable configurations for schemas. It contains one or more <reusable>
sub-elements, each uniquely identified by the id
attribute.
Element | Attribute | Required | Description |
---|---|---|---|
<reusables> |
None | No | Container for reusable schema definitions. |
<reusable> |
id |
Yes | Unique identifier for the reusable schema definition. |
<reusables>
<reusable id="exampleSchema1">
<anyOf>
<string minLength="1" maxLength="255" />
<int min="0" max="100" />
</anyOf>
</reusable>
<reusable id="exampleSchema2">
<listOf>
<value>
<type value="string" />
</value>
</listOf>
</reusable>
</reusables>
Since 1.0.0, IntelliJ NEON Nette Support plugin is compatible with all major JetBrains IDEs with version 2021.1.1 and higher.
Bug reports can be realized in GitHub public repository.
© 2022 Matouš Němec