SilverStripe template plugin for Jetbrains IDEs
IDEA-SilverStripe adds support for SilverStripe templates to PHP IDEs based on the IntelliJ IDEA platform (IntelliJ IDEA, IDEA Community Edition and PhpStorm). The primary focus is PHPStorm since SilverStripe is a PHP framework.
- To install the latest release (and get automatic updates), install this plugin using your IDE's plugin manager:
Settings->Plugins, choose "Browse repositories". Search for "SilverStripe" or find "SilverStripe template language support" in the list, right-click, and select "Download and Install"
- To install the most bleeding edge version, download or clone this repo and install this plugin using your IDE's plugin manager:
Settings->Plugins, choose "Install plugin from disk...". Point it to the
idea-silverstripe.jarfile and restart the IDE.
- If you want to update either do a git pull if you've cloned the repo or download the repo again and simply reinstall the plugin.
- If you have already added
*.ssfiles to your file types manually you need to remove it for the plugin to work. Go to
Settings->File Typesand remove
*.ssfrom the file type you added it to (most likely html).
- You need to manually associate
*.ssfiles with this plugin. Go to
Settings->File Types, look for
Silverstripe template fileand add
*.ssto the list of registered patterns.
- Basic syntax error highlighting with wanrings for mismatching blocks and unclosed blocks.
- Code folding for if, with, loop and control blocks.
- Full highlighting of the basic SilverStripe template language.
- Resolving of files in include statements.
- Basic error checking in translation and include tags.
- By default, files matching
*.ssare handled by this plugin. Configure other file patterns in
- Make the parser even better.
- Code completion.
- Custom method and variable resolutions. IE for example resolving $ThemeDir to the actual dir in the project. Figure out variable scope etc.
- Everything else.
This is my first outing in Java programming so any help you can give me is greatly appreciated. If you make a feature request please keep in mind that I will most likely not know how to implement the feature and just might need your help. I'm well aware that I'm not the best candidate for this project knowledge wise but hey, I have the spare time for it!
There's a variety of ways you can help this project out:
- Contributing without coding
- File issues for bugs, suggestions and requests. This is a great and easy way to help out.
- Contributing code
- The awesome developer setup instructions provided by @dmarcotte should get you up and running in no time.
- After the initial setup clone or fork this repo and create an IntelliJ IDEA plugin project. When the project is created you need to mark the gen package and the resources package as source roots for the project to compile properly.
- Look at contrib-welcome issues for ideas, or submit an idea of your own.
A big thank you goes out to Daniel Marcotte and his Handlebars plugin. Without his help this plugin would never have seen the light of day and he is totally awesome. Thank you @dmarcotte! Head on over and fork his modules and give him some love. This will hopefully be enough to make him forgive me for stealing his readme as a basis for my own. I'm sorry but it was just so good!
Thank you also to @juzna for his Latte in IntelliJ IDEA / PhpStorm with its simpler parser implementation which gave me enough confidence to roll my own. Last but not least a big thank you to the SilverStripe team and its community for making an awesome framework and CMS. Hopefully this plugin will help SilverStripe developers with their template development.