Skip to content

raket/idea-silverstripe

Repository files navigation

SilverStripe template plugin for Jetbrains IDEs

IDEA-SilverStripe adds support for SilverStripe templates to IDEs based on the IntelliJ IDEA platform (IntelliJ IDEA, IDEA Community Edition, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode). The primary focus is PHPStorm since SilverStripe is a PHP framework but the plugin should work in all the versions.

Installing

  • To install the latest release (and get automatic updates), install this plugin using your IDE's plugin manager:
    • In 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:
    • In Settings->Plugins, choose "Install plugin from disk...". Point it to the idea-silverstripe.jar file 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 *.ss files to your file types manually you need to remove it for the plugin to work. Go to Settings->File Types and remove *.ss from the file type you added it to (most likely html).
  • You need to manually associate *.ss files with this plugin. Go to Settings->File Types, look for Silverstripe template file and add *.ss to the list of registered patterns.

Features

  • 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 *.ss are handled by this plugin. Configure other file patterns in Settings->File Types.

Future directions

  • 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.

Contributing

Contributions welcome!

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

Acknowledgements

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.

About

IDEA plugin for the SilverStripe framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published