Current status: stable, basic functions
Neon is a YAML-like language useful for configuration. It is part of Nette framework and it's very nice! You should definitely use it.
This plugin aims to add supports for this language into PhpStorm (or the whole IntelliJ platform).
- lexer, parser (internal)
- syntax highlighting
- comment/uncomment
- bracket / parenthesis matching
- code completion
- go to class
- ... more to come
Does GitHub already have your 💳? Does Nette plugins save you development time? Send a couple of 💸 a month my way too. Thank you!
To request an invoice, contact me through e-mail.
- Go to File → Settings in PhpStorm
- Select Plugins on the left
- Click Browse Repositories button on the bottom
- Find NEON support and install it
- Optional: Install also Nette framework helpers plugin ;)
If you prefer your own build from master, open this project in IntelliJ IDEA as a Plugin project, go to Build -> Prepare for deployment and install it in your PhpStorm.
Please tell me what features you'd like in Issues tab.
If you want to contribute, please read development.md
Plugin uses Gradle to build, but before build you need to install Grammar-Kit plugin to Intellij Idea, right click in file explorer to LatteParser.bnf located in com.jantvrdik.intellij.latte, click to Generate Parser Code, then select PSI root to src/main/gen/com/jantvrdik/intellij/latte/psi and generated parser as src/main/gen/com/jantvrdik/intellij/latte/parser/LatteParser.class
After generating parser files, you need to generate a .flex file from the same .bnf file, right click to file and choose option Generate JFlex Lexer and generate _LatteLexer.flex in the same folder.
Now you can build plugin using gradle, and it will automatically generate another classes from .flex files, if you want you can help us automate system, so next time no one must do the manual generation work.
$ gradlew build
To build .jar
file to local install to IDE run gradle task buildPlugin
. .jar
file with plugin will be located in build/libs
Create file local.properties
in project and insert next content with path to IDE directory:
For your current OS see default IDE paths
: https://www.jetbrains.com/help/idea/tuning-the-ide.html#default-dirs
runIdeDirectory = /Users/<user id>/Library/Application Support/JetBrains/Toolbox/apps/PhpStorm/ch-0/201.7223.96/PhpStorm 2019.3 EAP.app/Contents
And run gradle task :runIde
ideally by run configurations in IDEA (it supports debugging).