Spellchecking
Configure: Settings | Editor | Natural Languages | Spelling
Inspection: Settings | Editor | Inspections | Proofreading | Typo
MPS looks for spelling errors in single-line comments, Javadoc text, and string literals.
If a detected typo is actually a valid word, you can add it to a user-defined dictionary that extends built-in dictionaries.
Select Add to dictionary to add the word to the user's dictionary and do not report it in the future.
If you have added the word by mistake, press Ctrl0Z to remove it from the dictionary.
tip
Press F2 and ShiftF2 to step through all problems in the current file, including typos.
Press CtrlAlt0S to open settings and then select Editor | Inspections.
Expand the Proofreading node.
Clear the checkbox next to the Typo inspection.
Press CtrlAlt0S to open settings and then select Version Control | Commit.
In the Commit Message Inspections, clear the Spelling checkbox.
Go to New Projects Setup | Settings for New Projects.
Clear the checkboxes described above. This will affect the projects created or opened for the first time after you save the settings.
Spellchecking is enabled for all languages. To indicate that the text of a particular editor cell should be checked against a dictionary (as configured in Settings), add the ’spellcheck’ style attribute in the Inspector to the cell in your editor declaration.
tip
When building a standalone IDE (Rich Client Platforms aka. RCP), don’t forget to include the ’jetbrains.mps.editor.spellcheck’ plugin in a distribution.
MPS includes bundled dictionaries for all configured languages. You cannot change them directly, but you can extend the spellchecker in other ways:
Save words to a built-in global or project dictionary.
Add plain-text files with the .dic extension that contain lists of words.
Add Hunspell dictionaries, each of which consists of two files: the DIC file that contains a list of words with the applicable modification rules and the AFF file that lists prefixes and suffixes regulated by a specific modification rule. For example, en_GB.dic and en_GB.aff.
Press CtrlAlt0S to open settings and then select Editor | Natural Languages | Spelling.
Configure the list of custom dictionaries:
To add a new custom dictionary to the list, click
or press AltInsert and specify the location of the required file.
To edit the contents of a custom dictionary in MPS, select it and click
or press Enter. The corresponding file will open in a new editor tab.
To remove a custom dictionary from the list, select it and click
or press AltDelete.
Press CtrlAlt0S to open settings and then select Editor | Natural Languages | Spelling.
If you want to choose the dictionary manually every time you save a highlighted word, clear the checkbox next to the Use single dictionary for saving words option.
If you want to save highlighted words on the project level, leave the checkbox selected and choose project-level next to that option.
Press CtrlAlt0S to open settings and then select Editor | Natural Languages | Spelling.
Add words to the Accepted words list. MPS always adds manually accepted words to the project-level dictionary.
You can't add words that are already present in one of the dictionaries and mixed-case words, such as
CamelCase
andsnake_case
.
The Accepted words list also shows words that you saved to any of the built-in dictionaries using the AltEnter menu.
It does not show words added to the shared project-level dictionary by other users and words from other custom dictionaries, but these words will be still ignored by the spellchecker.
MPS stores the built-in project-level dictionary in the d.xml file in the .idea subdirectory of your project directory with other project-related files.
When you share this file with your project team through VCS, other team members using MPS will be able to access the dictionary to share the list of ignored words.
Thanks for your feedback!