QUESTION -- WebStorm: Spelling (Where do we place a user dictionary?)

The documentation for Spellchecking says we can create user dictionaries:

spellchecking.png

Where does the user dictionary get placed for just a project?

I placed a user dictionary at the project root level. But the word I placed in the dictionary is reported as misspelled by Inspect Code. Why?

QUESTION:
  1. Where are user dictionaries placed?
3 comments
Comment actions Permalink

Hi there,

There are IDE-wide and project/user specific dictionaries.

1) The text on screenshot refers to IDE-wide ones. You can place it anywhere . .but IDE will be trying to use it for every project; therefore it's better to place it in separate folder in some shared/common location (e.g. "~/MyProjects/dictionaries").

NOTE: Do not forget to add that path in "Settings (Preferences on Mac) | Editor | Spelling | Dictionaries tab" -- IDE will load all dictionaries from such folder.

2) The user/project specific dictionaries is just a list of words that you were marked as acceptable/correct via context menu. Such dictionaries are stored in "PROJECT_ROOT/.idea/dictionaries/USERNAME.xml" file and it's a XML file.

  • You do not need to edit such files directly (but you can, if necessary; while IDE/project is closed, of course)
  • There could be more than one file there (one for each user) -- words from all files will be used
  • List of words from such files can be seen/edited at "Settings (Preferences on Mac) | Editor | Spelling | Accepted Words tab"
0
Comment actions Permalink

Thanks for responding, Andriy.

I am finding that I am able to add words (flagged as a misspelling) to the Accepted Words list by doing either of the following:

  1. Click "Save to dictionary" in the "Results for Inspection" panel; or
  2. Highlight the word in the editor and choose "Spelling -> Typo: Save '<word>' to dictionary".


But the wording seems confusing: the targeted word is being added to the "Accepted Words" list, not one of the built-in dictionaries.

How do I make the suggestion that the wording be clarified in the Inspection panel and the contextual menu?

I would like to suggest:

In the Inspection Results panel:

inspection-panel.png

Change this:

Save to dictionary

to this:

     Save to Accepted Words list


In the contextual menu:

contextual-menu.png

Change this:

Typo: Save 'maxcdn' to dictionary

to this:

     Typo: Save 'maxcdn' to Accepted Words list



Changing "dictionary" to "Accepted Word list makes is clearer where the word is actually being placed.

0
Comment actions Permalink
But the wording seems confusing: the targeted word is being added to the "Accepted Words" list, not one of the built-in dictionaries.

1) I see no reason at all why it should be added to any of the built-in dictionaries.

2) "Accepted words" is basically per project user-generated dictionary.

3) At the same time, dictionary file (the format this IDE uses) is just a list of words (all possible forms -- one word per line -- no "fancy" things like word-forming rules etc -- just a simple list).

Changing "dictionary" to "Accepted Word list makes is clearer where the word is actually being placed.

I do not like such idea: "dictionary" is a better word than "accepted word list" from any aspect (IMHO, of course): it is shorter, better sounding, more recognizable.

If it would be up to me I would rather change "Accepted Word List" to something like "User-generated dictionary" or something like that.

In any case: feel free to submit your suggestions to the Issue Tracker

0

Please sign in to leave a comment.