Consulo is a powerful platform for building development tools targeting any language. Most of the IDE features consist of language-independent (provided by the platform) and language-specific parts. Supporting a particular feature for a new language can be achieved with a small amount of effort: a plugin must implement only the language-specific part.
This part of the documentation explains the main concepts of the Language API and guides you through the sequence of steps that are usually required to develop a custom language plugin. You can obtain additional information about the Language API from the JavaDoc comments for the Language API classes and from the Properties language support source code, which is part of the IntelliJ IDEA Community Edition source code.
If you prefer a full example to the detailed descriptions offered in this section, please check out a step-by-step tutorial on how to create custom language support for Simple Language: Custom Language Support Tutorial. Corresponding steps from the tutorial are linked under the "Examples" section on each page of this reference.
The webinar How We Built Comma, the Raku IDE, on the Consulo offers an excellent introduction as well.
Providing custom language support includes the following major steps:
- Registering File Type
- Implementing Lexer
- Implementing Parser and PSI
- Syntax Highlighting and Error Highlighting
- References and Resolve
- Declarations and References
- Code Completion
- Find Usages
- Rename Refactoring
- Safe Delete Refactoring
- Code Formatter
- Code Inspections and Intentions
- Structure View
- Surround With
- Go to Class and Go to Symbol
- Additional Minor Features