android-studio

How to add a global dictionary for spell check in Android Studio


I know that Editor -> Spelling configuration section has option to add dictionaries.

But those are remembered per-project what has some problems*.

How can I add global dictionary? Optionally, where IDE-wide dictionary is located?

And yes, I know that I can add individual words. But I have global custom dictionary with words often missing in typical dictionaries** and I want to reuse it, also in Android Studio.

*For start, Android Studio config often gets confused and I need to reset project to get build working again and this throws away dictionary config.

**Yes, I reported missing words. Reports get ignored/wontfixed/invalidly closed, see for example https://issuetracker.google.com/issues/270723780 https://issuetracker.google.com/issues/411470803 https://github.com/en-wl/wordlist/issues/365


Solution

  • The location where you can add new dictionaries is also where you can edit the existing ones:

    It opens the dictionary XML file where you can modify the dictionary as a whole. Just add everything you want here.

    On my Windows machine the path to the file is

    %appdata%\Google\AndroidStudio2024.3.2\options\spellchecker-dictionary.xml
    

    This is specific to the Android Studio version you use (here: Meerkat 2024.3.2). When you upgrade Android Studio, however, this file is migrated to the folder of the new version, so you won't lose what you added there.