Search code examples
dictionaryintellij-ideaversion-controlspell-checking

How to create a shared editable dictionary for IntelliJ IDEA spellchecking?


We want to have a dictionary for IntelliJ IDEA spellchecking that meets the following requirements:

  1. Could be shared by VCS, so all developers can use it
  2. Every developer should be able to edit it easily

As far as I know, there are 2 types of dictionaries in IDEA:

  1. One user dictionary, named "%username%.xml" (Settings-->Spelling-->Accepted Words)
  2. Number of custom dictionaries, "*.dic" (Settings-->Spelling-->Dictionaries)

But none of them meets the requirements.

User dictionary is easy to edit (Alt+Enter "Save ... to dictionary") and can be added to VCS, but it has a predefined user name, so it's impossible to share (e.g. developer A shared his A.xml, but developer B can't use it, because his IDEA project only works with B.xml)

Custom dictionary has no problems with sharing, but it should be edited manually and we need to restart IDEA to apply changes (e.g. make it see new words).

I've not found a plugin to solve that problem or any similar question, which makes me think that nobody needs such dictionary or the answer is too obvious.

So, is there any way to do it?


Solution

  • Note that, even though the words added to the dictionary by each developer are stored in a separate file, IntelliJ IDEA takes the words added by all developers, and does not highlight any of them as typos. The storage in separate files was designed specifically to avoid merge conflicts when storing the dictionary in a version control system.

    Therefore, the default functionality of IntelliJ IDEA should meet your requirements.