Login | Register
My pages Projects Community openCollabNet

Project home

If you were registered and logged in, you could join this project.

Summary IDEA Simple Syntax Highlighter
Category construction
Owner(s) the_french_dj


This plugin is not really usable anymore. Too much has changed inside IntelliJ IDEA and I really cannot keep up with this. I am also in over my head with all this lexing/parsing stuff. Right now I am moving this repository over to github. I will then try to recreate the original basic "keyword highlighting" version of the plugin and make it available as separate releases for the individual IntelliJ IDEA versions. Any help appreciated..


Generic syntax highlighting support for Intelli/J IDEA. Uses simple configuration files to add syntax highlighting for eg Ruby, Python or any other file type.

In contrast to writing a full-blown IDEA plugin for every language this plugin should have a new syntax available within minutes. In contrast to the XML filetypes extension that IDEA offers, this plugin is more flexible. (But of course less flexible than writing a full-blown language-specific IDEA plugin.. :)

The basic concept is this: You write a SimpleSyntax configuration file specifiying a lexer configuration file plus the syntax elements and default coloring. In its simplest form the lexer configuration is based on simple regular expressions. This has obvious limitiations because of nesting etc.

To allow for proper syntax highlighting, the SimpleSyntax plugin has been extended with more powerfull lexer configuration options:

Since version 0.18 a JParsec based approach is used for the lexer configuration. The syntax is specified using a Groovy or JRuby script. The script creates a JParsec lexer which is then adapted to the IntelliJ lexer API.

Since version 0.19 a JFlex based approach can be used for the lexer configuration. The syntax is specified using a Groovy or JRuby script. The script creates a JFlex lexer which is then adapted to the IntelliJ lexer API.

Please see the example configurations in the 'SimpleSyntax/config' folder. You may want to check out the current state of things in the repository: trunk/config


After installing the plugin via the IDEA plugin manager, the Tools menu contains two new menu entries. Use 'Init SimpleSyntax' to activate the plugin. This will install some default configuration files and make the syntax highlighting available for all configured file types. (Right now this should enable Ruby highlighting unless you have the JetBrains Ruby plugins installed. It should also activate highlighting for SimpleSyntax .config files.

The configuration files used by the plugin are stored in IDEA's 'config/options' folder. For Windows systems this would be something like 'C:\Documents and Settings\Daniel\.IntelliJIdea60\config\options\SimpleSyntax'. There you can change the existing Ruby configuration or add new configurations for Python, ActionScript, or whatever.. :)

After changing the configuration files, use the 'Reload SimpleSyntax' entry in the Tools menu to reload the configuration files and make your changes available.

Unfortunately since version 0.20 of the plugin it is no longer possible to configure the color settings of the highlighting from within the IDEA 'Colors & Fonts' editor. Because of the dynamic way SimpleSyntax handles the configured languages, it would break IDEA. Therefore you have to go back to the configuration files and edit and reload them.


Please have a look at the IntelliJ IDEA related entries in my blog:

This should explain the rationale of this project quite nicely: Even though I'm quite happy with IDEA overall, I think it has become too bloated and complex. With this plugin I'm trying to bring back some sanity.. :)

Development Status

  • This plugin is usable, but in an beta stage.
  • Performance is acceptable for source code sizes up to a few thousand LOC.
  • No proper plugin UI is provided. Configuration is based on editing text files in the plugin folder.


Please don't hesistate to contact me in case of problems with the use and/or configuration of the plugin. Email me at simplesyntax [AT] intensicode [DOT] net. I'm also available as 136320506 on ICQ or thefrenchdj on AIM.

Download / Availability

The plugin is available through the IDEA Plugin Manager.

Example Configurations

  • SimpleSyntax - Groovy/JFlex based configuration for SimpleSyntax .config files
  • JParsec and Ruby - Groovy/JFlex based configuration for SimpleSyntax .config files

Road Map

Unfortunately my job keeps me too busy right now to make any promises about dates. But these are the things I have planned for SimpleSyntax:

Milestone 1: Testing [COMPLETED]

  • Implement the basic idea of a simple highlighter.
  • Make init/reload more polite: Ask before overwriting files and/or overriding filetypes.

Milestone 2: Flexibility [COMPLETED]

  • Switch to more flexible lexer configuration.
  • Use Groovy and/or JRuby to build syntax configuration based on JParsec.
  • Add more configuration presets (Property files, etc).
  • Investigate JFlex-based approach for maximum performance.

Milestone 3: GUI

  • Add simple plugin configuration UI.
  • Make it possible to turn available configurations on and off.
  • Add config downloading (from plugin home - which is here, I guess).