Plugins

Meet Grazie: the ultimate spelling, grammar, and style checker for IntelliJ IDEA

Development is not all about programming languages. A lot of text in your code is for humans, not the compiler: string literals, comments, Javadocs, commit messages, and much more requires at least some knowledge of English or other natural languages, depending on your team and users. So isn’t it great when your IDE checks not only your code constructs, but also the spelling, grammar, and style of natural language text? Now we have a great tool to reduce your need for native-speaker editors, or at least reduce the number of mistakes that they need to clean up in your code.

Grazie is a plugin for IntelliJ IDEA that provides intelligent checks beyond simple spelling mistakes and typos. It understands grammar rules and can warn you about inappropriate style.

Grazie highlights mistakes and suggests fixes

By default, Grazie includes only English, but you can add more than 15 other language models and all checks are performed locally after the corresponding model is downloaded and enabled. To add other languages and configure the rules, open Settings / Preferences and then select Tools | Grazie.

Configure languages and rules for Grazie

In the top part, you can add necessary language models and select your native language: this is for beginner level speakers. For example, if you are a Russian native and your English is not ideal, Grazie has rules to highlight common mistakes that Russian speakers make in English text. You can see those rules in the screenshot: mixing “than” and “then”, “adapt” and “adopt”, also words like “magazine” mean something completely different in Russian, and so on. You can disable the whole bunch of Commonly Confused Words if you are sure you can avoid trivial mistakes yourself.

The Enable Grazie Spellchecker checkbox is a legacy option that was used to replace the built-in spellchecker with the one used by Grazie in previous versions of the plugin. But now Grazie extends the built-in spellchecker. This option now enables the built-in spellchecker (because the Grazie dictionary integrates into it) for all of your projects. And if you do not want to check the spelling in all of your projects, disable this option and then enable the Spelling inspection for specific projects (Grazie will integrate wherever the built-in spellchecker inspection is enabled).

The Check Commit Messages option is disabled by default because it requires integration with the built-in VCS support via changes in the configuration file (vcs.xml). These changes can be safely committed, so you can enable checks in commit messages if you are fine with this.

Grazie is already available for IntelliJ IDEA starting from version 2019.2.4, and for the upcoming 2019.3 EAP. It is easily extensible by other plugins and IntelliJ-based IDEs, so any programming or markup language can now include Grazie grammar checks for its constructs. If you are a plugin developer, be sure to implement the GrammarCheckingStrategy for your language. And stay tuned for Grazie in other JetBrains IDEs.

If you find any bugs or would like to suggest a feature request for Grazie, you can submit your feedback in YouTrack.

Happy developing!

image description

Discover more