Language Plug-Ins


Language plug-ins add support for new coding languages to Espresso, or less often modify or extend the language support from another plug-in.

Espresso generates the syntax zones that make up a document using regular expressions defined in syntax definitions within language plug-ins.

Defining a new syntax for Espresso can involve several files and folders:

Language plug-in checklist

Although some of these can be done in a different order, these are generally the steps to creating a language plug-in:

  1. Create a basic plug-in (download basic plug-in template or find more info in plug-in structure)
  2. Create a Languages.xml file and populate it with basic details for your language
  3. Create a Syntaxes folder, and start defining your basic syntax zone regex

While working on the syntax zones, you will want to have an example document open so you can make sure that everything is working the way you expect (use the Syntax Inspector to verify). Remember that XML changes to your plug-in require restarting Espresso before you can see the changes!

Once you are happy with the basics of your syntax definition, you can implement Itemizers if you are so inclined, and a placeholder theme. If your language uses non-standard comments, you can define them with ContextualSettings.

Typically you will also want to implement CodeSense in your language plug-in, as well.