ReSharper 2018.2 Help

Spell Checking with ReSpeller

One important task of code inspection is spell checking, which ReSharper performs with ReSpeller — its integrated spell-checking engine. ReSpeller will look for spelling mistakes in identifiers, comments, and string literals. When it detects a potential spelling mistake or a typo, it will let you know in the same way as other code issues — in design time or when you run code inspection is specific scope.

Similarly to other highlighted issues, you can press Alt+Enter and choose Replace with… to choose one of the ReSpeller's suggestions.

ReSharper: Detecting and fixing typos

If you use the ReSpeller's quick-fix to fix a typo in an identifier, the Rename refactoring will be invoked automatically to ensure consistency of the change across your code base.

ReSpeller dictionaries

ReSharper comes with a built-in dictionary for English (United States), but it allows you to install and use Hunspell /MySpell dictionaries for other languages. A lot of dictionaries can be found on https://github.com/wooorm/dictionaries.

To install custom dictionaries

  1. Select ReSharper | Options in the main menu, then choose Environment | ReSpeller on the left.
  2. Add the desired Hunspell/MySpell dictionaries — click Add and pick a Hunspell dictionary file (.dic). Note that you also need to have the affix file of the dictionary (named the same as the dictionary file but with the .aff extension) next to the dictionary file.
  3. While you are at this page, you can specify which kinds of identifiers and strings should be spell-checked and which should not.
  4. Click Save to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see managing and sharing resharper settings.

You can extend the installed dictionaries with other words, which will be stored using the settings layers together with other preferences. There are two ways to add user words:

  • When your caret is on a highlighted spelling issue in the editor, choose Add to user dictionary from the Alt+Enter menu. The word will be saved using the smart save logic, but you can also expand the submenu to choose a specific settings layer:
    ReSharper: adding user words for spell checking
  • On the Environment | ReSpeller page of ReSharper options, use the User words field to configure a newline-separated list of words to be ignored by the spell-checker.

Configuring ReSpeller inspections

By default, ReSpeller is enabled in many of ReSharper’s supported languages. You can enable/disable individual inspections and change their severity levels by searching for typo on the Code Inspection | Inspection Severity page of ReSharper options.

This feature is supported in the following languages and technologies:

Language: C# Language: VB.NET Language: C++ Language: HTML Language: ASP.NET Language: Razor Language: JavaScript Language: TypeScript Language: CSS Language: XML Language: XAML Language: Resx Language: Build Scripts Language: Protobuf Language: JSON
Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is available Feature is not available Feature is available Feature is available Feature is available Feature is not available Feature is not available Feature is available

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.

Last modified: 12 September 2018