Grazie (Lite) was a core plugin for IntelliJ for grammar and style checking. It was announced in 2019 and quickly integrated and expanded the built-in spell checking capabilities in 2020.

You may have been using it without realizing it! Let’s fast-forward to now, and present Grazie Pro which is the new AI-powered version of Grazie developed by JetBrains, which is supposed to extend and supersede the existing Grazie lite.

It comes as a plugin to install on your IntelliJ IDE. Unlike GitHub Copilot, this tool will is not for code completion per se. It self-proclaims to provide an “intelligent” grammar check and assistance for natural language processing. Natural language, meaning english or spanish in contrast to “unnatural languages” like Java or python 🙃.

Setup

Install the plugin

This feature seems still a bit on its early stage, and I was testing a “beta” version, but now it is available through the plugin store directly.

  • Press + , to open the IDE settings and select Plugins.
  • Switch to the Marketplace tab, search for Grazie Pro, select the plugin and click Install.

Enable Grazie Pro

Once downloaded, you can enable it via the IDE settings to save you the trouble of checking the documentation. Here’s the setup:

  • Press + , to open the IDE settings and select Editor > Natural Languages > Grazie Professional.
  • Under Processing, select Grazie Cloud and click Connect.

I have an Ultimate account which I guess grants me access to the “Cloud version”, the “locale version” is also an option but is limited in terms of language compatibility or completion. Obviously, by using the cloud, what you’re writing will travel to IntelliJ’s server for analysis, so be mindful if you work with any confidential information.

Grazie Pro doesn’t seem to be “working” even-though it is enabled?

  • Make sure you have enabled the spellchecking and the proofreading inspection for “typo”. I had the issue where the markdown plugin was interfering with it too, after refreshing the plugin and clearing the .idea folder of the project and restarting the IDE, the problem fixed itself.

From the setting page, it seems you can modify the type of assistance and completion you would like to receive. You can set a custom one or use one of the existing profiles. It looks rather furnished with grammar rules, which can be hard to wrap your head around.

In action

Like in the code, Grazie is integrated with the light bulb icon, and you can press + enter↩ to see the different options.

Auto-completion

The suggestions for text completion, at least in my case appear very limited. It doesn’t try or guess what I’m going to type next and when it does, it’s just a few words, so in the range of what you would expect from a mobile keyboard app.

grazie-completion-1.png
grazie-completion-2.png

Then, the suggestion are not very visible in my case, I would have liked it to be adapting to a “dark” theme out of the box. It seems like they used the same colour as the one used for the light theme for the demo. So even if the suggestions were excellent, I couldn’t see them.

You can insert suggestion work per word using (tab) or the whole phrase with +

I do like the possibility to add word per word (missing in Copilot), as sometimes only the first few words are relevant, so you can skim out the rest.

Syntax

IntelliJ used to have by default grammar and syntax corrections, so with Grazie, it appears that those core functionalities were moved to the plugin? Well not exactly, it seems that Grazie extends the built-in spellchecker.

To run the spellcheck analysis:

  • Go to Code > Analyze Code > Run Inspection by Name… or press + + + I
  • then select Typo

But you can still go through each typo individually and see the proposed solution in context:

grazie-spellcheck.png

There are also some new suggestions for the whole file (that doesn’t seem to be “Grazie Pro”-based, but that I hadn’t noticed before), though can be highlighted suggested multiple times even after choosing either option. See the tool tip:

grazie-all-check.png

Here it’s to use the contracted form I'm, don't, .. or the full form I am, do not, .., and based on that choice, it will correct it everywhere in the file to make it consistent.

Rephrasing

I’m guessing that’s where some of the cloud and AI capability come in to play, since that suggestion part for the auto-completion wasn’t very impressive. There’s now the rephrasing option with Grazie which once select does take a few seconds (my internet connexion?) before coming up with some options. Naturally I tried with a less than perfect sentence hoping for some miracle:

grazie-rephrase-1.png
grazie-rephrase-2.png

I guess I’ll have to make do with my writing problems 🥲 But let’s be fair; the rephrasing beside it usage can alert via a blue underline when it deems that you’re not in a _Shakespearean_phase. This is half the job.

And, you can get a good rephrased proposition, in some cases on account that you select the full sentence:

grazie-rephrase-3.png
grazie-rephrase-4.png

Otherwise, Grazie might just try to find a synonym for the underlined word, which won’t solve the style issue. The suggested style is often direct and straight to the point.

Translation

However, the translation is surprisingly more accurate; I tried the spanish version of my little text using the Translate with Grazie option:

grazie-translation.png

And the result is that it translated the meaning of the sentence even-though it was filled with typos and errors. See for yourself Tengo mucho problema para escribir, ¡ ayudeme!, it skipped the politeness, where’s my por favor!? But the rest is kind of good, mind the weird space in front of the ¡ that shouldn’t be there.

Now if you translate over and over, it has the same google hysteresis translate effect. Also the level of translation between languages differs, and I might have been lucky on that previous example.

Though I can see potential value when working in an environment where the language used is not your native one. The translation on the fly can give you some context of what it means without having to quit your IDE.

Colour highlighting

Like with code, there’s now a colour highlighting option with Grazie:

grazie-highlight.png

It makes your text all rainbow 🦄 based on the “job” of the text, like noun, verb, adjective, adverb, etc. It is rather interesting to see it highlighted, but I was not really convinced by the added value.

Unlike for code, I wasn’t taught to write respecting a certain syntax with verbs and adjectives, but the rational approach of insinuating that writing text could be like writing code makes you wonder. Grazie Pro would just be a linter for the “text” language. 😅

Conclusion

It does fall short for me, but to be honest, I was expecting a lot from this new tool, some kind of grammarly with suggestions at the same level as GitHub copilot.

The spellcheck doesn’t seem to be more powerful than the original one, however, the grammar part does catch errors that could have been missed without it. (At least for poor illiterate me)

The translation feature is a plus, but it is still too unreliable to be used without second thoughts about its truthfulness to the original content.

Still, I’m glad they’re investing in natural language tools, as I’ve been relying on the built-in spellcheck for the longest time, and I still make numerous mistakes. Everything helping me write my best self is worth a shot!