Extending Espresso is easy, thanks to its CSS-based syntax coloring themes, JavaScript-based text actions, and XML-based language definitions.
You can extend Espresso using the web languages you already know: CSS, XML, JavaScript, and regular expressions (regex is only necessary if you are adding support for a new language). Because you are using common web languages, you can edit your plug-in's files inside of Espresso. There is even a special EspressoDev plug-in to make editing plug-in XML and JavaScript files easier.
You can currently extend Espresso in two ways:
Espresso plug-ins use the file extension .espressoplugin (although some older plug-ins may still use the extension .sugar).
Espresso breaks the text in a document into syntax zones using regular expressions that are defined in a plug-in. Using those syntax zones, Espresso separates the document into logical chunks called Itemizers and colors the syntax zones using the active CSS theme. Itemizers are used to determine what code should be foldable and show up in the Navigator. As you edit the document, different actions and CodeSense will be available depending on the syntax zone your text cursor is inside.
Many aspects of both plug-ins and themes rely on CSS-like selectors that leverage the syntax zones that define the basic parts of the document.
The above functionality breaks down into several basic systems depending on how you want to extend Espresso:
It is also possible to define file actions (that act on files instead of text) or text actions with custom interface elements in Objective-C using the Cocoa API.