Write My Own Lexer (Synxtax Highlighter)
Using a plugin, is this possible? I mean, if I wanted to write a syntax highlighter for another language.
See, we use this archaic language 4GL some (I hate it, but no choice) and PHPStorm still works well, except I'd like to have syntax highlighting.
Please sign in to leave a comment.
Sure. Most language support modules in PhpStorm including the PHP are the plugins.
You can start from here http://confluence.jetbrains.net/display/IDEADEV/Developing+Custom+Language+Plugins+for+IntelliJ+IDEA
Hello Keith,
Also you can define the syntax highlighting by yourself using a custom file type (Settings | File Types).
Attachment(s):
custom_syntax_highlighter.png
Awesome. This works pretty well. Because this language is VB like (no parens, braces, and variables don't $), I may still have to write my own lexer, but this helps immensely for now and it was quick!
Oh, I'm cheating by adding the actual variable names as keyword group 4. Pain. Still, it will help with errors.
Descriptions of custom file types can be found at ~\.WebIDE10\system\config\filetypes on Windows and Linux and at ~/Library/Caches/WebIDE10/system/config/filetypes on OS X, where ~ stands for user home directory.
So you can share it.
You mean:
~\.WebIDE10\config\filetypes for Windows. (not system)
Yes. I'm sorry.
~\.WebIDE10\config\filetypes for Windows and Linux
~/Library/Caches/WebIDE10/config/filetypes for OS X