

To add a new custom dictionary to the list, click or press Alt+Insert and specify the location of the required file. Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.Ĭonfigure the list of custom dictionaries: If you have the Hunspell plugin installed and enabled, you can add Hunspell dictionaries, which comprise 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. dic extension that contain lists of words. Save words to a built-in global or project dictionary.Īdd plain-text files with the. You cannot modify them directly but you can extend the spellchecker in other ways: IntelliJ IDEA includes bundled dictionaries for all configured languages. To disable the Typo inspection, clear the checkbox next to it. Process comments: check text inside comments. Process literals: check text inside string literals.
JAVA SPELLING CORRECTOR CODE
Process code: check various code elements, such as names of classes, fields, and methods. Specify the severity level and the scope in which to apply this level.įor example, if you want typos to stand out more, select Error or Warning to highlight typos similar to syntax errors or warnings in your code. In the right-hand pane, configure the Typo inspection: Press Ctrl+Alt+S to open the IDE settings and select Editor | Inspections.Įxpand the Proofreading node and click Typo in the central pane. Configure the Typo inspectionīy default, the Typo inspection checks all text including code elements, string literals, and comments in all scopes. For more information, see Select the default dictionary for saving words. You can choose to save words to the project-level dictionary if the spelling is correct only for this particular project.

If you have added the word by mistake, press Ctrl+Z to remove it from the dictionaryīy default, IntelliJ IDEA saves words to the global application-level dictionary.

Select the Save to dictionary action to add the word to the user's dictionary and skip it in the future. Place the caret at a word highlighted by the Typo inspection. To jump to the next misspelled word, press F2.

Select one of the suggested fixes from the list. Place the caret at any word highlighted by the Typo inspection.Ĭlick or press Alt+Enter to show the available intention actions. For more information, see Configure the Typo inspection. Disable the Typo inspection if you want to ignore all spelling mistakes. You can either correct the spelling or accept the word as correct. The Typo inspection detects and highlights words not included in any dictionary. Where the Rename refactoring is available, the inspection suggests to rename all occurrences of a symbol (for example, names of classes, fields, and methods). In textual strings and comments, only the spelling of this particular word at caret changes. For this purpose, IntelliJ IDEA provides a dedicated Typo inspection which is enabled by default. IntelliJ IDEA helps you make sure that all your source code, including variable names, textual strings, comments, literals, and commit messages, is spelt correctly.
