Skip to main content

CSpell Configuration

Settings​

FieldTypeDescription
$schemastringUrl to JSON Schema
allowCompoundWordsbooleanTrue to enable compound word checking.
cacheCacheSettingsDefine cache settings.
caseSensitivebooleanDetermines if words must match case and accent rules.
descriptionstringOptional description of configuration.
dictionariesDictionaryReference​[]Optional list of dictionaries to use. Each entry should match the name of the dictionary.
dictionaryDefinitionsDictionaryDefinition​[]Define additional available dictionaries.
enabledbooleanIs the spell checker enabled.
enabledFileTypesobjectEnable / Disable checking file types (languageIds).
enabledLanguageIdsLanguageIdSingle​[]Specify a list of file types to spell check. It is better to use Settings.enabledFileTypes to Enable / Disable checking files types.
enableFiletypesLanguageIdSingle​[]Enable / Disable checking file types (languageIds).
enableGlobDotbooleanEnable scanning files and directories beginning with . (period).
enginesCompatibleEngineVersionsSpecify compatible engine versions.
failFastbooleanExit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
featuresFeaturesConfigure CSpell features.
filesGlob​[]Glob patterns of files to be checked.
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
gitignoreRootFsPath
FsPath​[]
Tells the spell checker to stop searching for .gitignore files when it reaches a matching root.
globRootFSPathResolvableThe root to use for glob patterns found in this configuration.
idstringOptional identifier.
ignorePathsGlob​[]Glob patterns of files to be ignored.
ignoreRandomStringsbooleanIgnore sequences of characters that look like random strings.
ignoreRegExpListRegExpPatternListList of regular expression patterns or pattern names to exclude from spell checking.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
importFsPath
FsPath​[]
Allows this configuration to inherit configuration for one or more other files.
includeRegExpListRegExpPatternListList of regular expression patterns or defined pattern names to match for spell checking.
languageLocaleIdCurrent active spelling language. This specifies the language locale to use in choosing the
languageIdMatchingFileTypeForces the spell checker to assume a given language id. Used mainly as an Override.
languageSettingsLanguageSetting​[]Additional settings for individual languages.
loadDefaultConfigurationbooleanBy default, the bundled dictionary configurations are loaded. Explicitly setting this to false
maxDuplicateProblemsnumberThe maximum number of times the same word can be flagged as an error in a file.
maxFileSizenumber,stringThe Maximum size of a file to spell check. This is used to prevent spell checking very large files.
maxNumberOfProblemsnumberThe maximum number of problems to report in a file.
minRandomLengthnumberThe minimum length of a random string to be ignored.
minWordLengthnumberThe minimum length of a word before checking it against a dictionary.
namestringOptional name of configuration.
noConfigSearchbooleanPrevents searching for local configuration when checking individual documents.
noSuggestDictionariesDictionaryReference​[]Optional list of dictionaries that will not be used for suggestions.
numSuggestionsnumberNumber of suggestions to make.
overridesOverrideSettings​[]Overrides are used to apply settings for specific files in your project.
patternsRegExpPatternDefinition​[]Defines a list of patterns that can be used with the ignoreRegExpList and
pnpFilesstring​[]The PnP files to search for. Note: .mjs files are not currently supported.
readonlybooleanIndicate that the configuration file should not be modified.
reportersReporterSettings​[]Define which reports to use.
showStatusbooleanShow status.
softWordBreakDefinitionsSoftWordBreakDefinitionsDefines a set of word break rules that can be used for text segmentation.
softWordBreaksSoftWordBreaksAllows enabling or disabling soft word break rules by name.
spellCheckDelayMsnumberDelay in ms after a document has changed before checking it for spelling errors.
substitutionDefinitionsSubstitutionDefinitionsThe set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
substitutionsSubstitutionsThe set of substitutions to apply to a document before spell checking.
suggestionNumChangesnumberThe maximum number of changes allowed on a word to be considered a suggestions.
suggestionsTimeoutnumberThe maximum amount of time in milliseconds to generate suggestions for a word.
suggestWordsstring​[]A list of suggested replacements for words.
unknownWordsUnknownWordsChoicesControls how unknown words are handled.
useGitignorebooleanTells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files found.
useIntlWordSegmentationbooleanEnables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc.
usePnPbooleanPackages managers like Yarn 2 use a .pnp.cjs file to assist in loading
userWordsstring​[]Words to add to global dictionary -- should only be in the user config file.
validateDirectivesbooleanVerify that the in-document directives are correct.
versionVersionConfiguration format version of the settings file.
vfsCSpellVFSFiles to add to the CSpell Virtual File System.
wordsstring​[]List of words to be considered correct.

Settings Fields​


$schema​

Description

Url to JSON Schema

Type

string


allowCompoundWords​

Description

True to enable compound word checking.

Type

boolean


cache​

Description

Define cache settings.

Type

CacheSettings


caseSensitive​

Description

Determines if words must match case and accent rules.

See Case Sensitivity for more details.

  • false - Case is ignored and accents can be missing on the entire word. Incorrect accents or partially missing accents will be marked as incorrect.
  • true - Case and accents are enforced.
Type

boolean


description​

Description

Optional description of configuration.

Type

string


dictionaries​

Description

Optional list of dictionaries to use. Each entry should match the name of the dictionary.

To remove a dictionary from the list, add ! before the name.

For example, !typescript will turn off the dictionary with the name typescript.

See the Dictionaries and Custom Dictionaries for more details.

Type

DictionaryReference​[]


dictionaryDefinitions​

Description

Define additional available dictionaries.

For example, you can use the following to add a custom dictionary:

"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Type

DictionaryDefinition​[]


enabled​

Description

Is the spell checker enabled.

Type

boolean


enabledFileTypes​

Description

Enable / Disable checking file types (languageIds).

This setting replaces: Settings.enabledLanguageIds and Settings.enableFiletypes .

A Value of:

  • true - enable checking for the file type
  • false - disable checking for the file type

A file type of * is a wildcard that enables all file types.

Example: enable all file types

File TypeEnabledComment
*trueEnable all file types.
jsonfalseDisable checking for json files.
Type

object

Since
8.8.1

enabledLanguageIds​

Description

Specify a list of file types to spell check. It is better to use Settings.enabledFileTypes to Enable / Disable checking files types.

Type

LanguageIdSingle​[]


enableFiletypes​

Description

Enable / Disable checking file types (languageIds).

These are in addition to the file types specified by Settings.enabledLanguageIds . To disable a language, prefix with ! as in !json.

Example: individual file types

jsonc // enable checking for jsonc
!json // disable checking for json
kotlin // enable checking for kotlin

Example: enable all file types

* // enable checking for all file types
!json // except for json
Type

LanguageIdSingle​[]


enableGlobDot​

Description

Enable scanning files and directories beginning with . (period).

By default, CSpell does not scan hidden files.

Type

boolean


engines​

Description

Specify compatible engine versions.

This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.

It does not enforce compatibility, it is up to the client to use this information as needed.

Type

CompatibleEngineVersions

Since
9.6.3

failFast​

Description

Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)

Type

boolean


features​

Description

Configure CSpell features.

Type

Features

Since
5.16.0

files​

Description

Glob patterns of files to be checked.

Glob patterns are relative to the globRoot of the configuration file that defines them.

Type

Glob​[]


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


gitignoreRoot​

Description

Tells the spell checker to stop searching for .gitignore files when it reaches a matching root.

Type

FsPath
FsPath​[]


globRoot​

Description

The root to use for glob patterns found in this configuration. Default: location of the configuration file. For compatibility reasons, for config files with version 0.1, the glob root will default to be ${cwd}.

Use globRoot to define a different location. globRoot can be relative to the location of this configuration file. Defining globRoot does not impact imported configurations.

Special Values:

  • ${cwd} - will be replaced with the current working directory.
  • . - will be the location of the containing configuration file.
Type

FSPathResolvable


id​

Description

Optional identifier.

Type

string


ignorePaths​

Description

Glob patterns of files to be ignored.

Glob patterns are relative to the globRoot of the configuration file that defines them.

The default is ["node_modules/"].

Warning: if you ignore ".git/" then it will also ignore ".git/COMMIT_EDITMSG" which is needed for the commit-msg git hook; in that case, rather use [".git/{info,lfs,logs,refs,objects}/**", ".git/{index,*refs,*HEAD}"].

Type

Glob​[]


ignoreRandomStrings​

Description

Ignore sequences of characters that look like random strings.

Type

boolean


ignoreRegExpList​

Description

List of regular expression patterns or pattern names to exclude from spell checking.

Example: ["href"] - to exclude html href pattern.

Regular expressions use JavaScript regular expression syntax.

Example: to ignore ALL-CAPS words

JSON

"ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]

YAML

ignoreRegExpList:
- >-
/\b[A-Z]+\b/g

By default, several patterns are excluded. See Configuration for more details.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


import​

Description

Allows this configuration to inherit configuration for one or more other files.

See Importing / Extending Configuration for more details.

Type

FsPath
FsPath​[]


includeRegExpList​

Description

List of regular expression patterns or defined pattern names to match for spell checking.

If this property is defined, only text matching the included patterns will be checked.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


language​

Description

Current active spelling language. This specifies the language locale to use in choosing the general dictionary.

For example:

  • "en-GB" for British English.
  • "en,nl" to enable both English and Dutch.
Type

LocaleId


languageId​

Description

Forces the spell checker to assume a given language id. Used mainly as an Override.

Type

MatchingFileType


languageSettings​

Description

Additional settings for individual languages.

See Language Settings for more details.

Type

LanguageSetting​[]


loadDefaultConfiguration​

Description

By default, the bundled dictionary configurations are loaded. Explicitly setting this to false will prevent ALL default configuration from being loaded.

Type

boolean


maxDuplicateProblems​

Description

The maximum number of times the same word can be flagged as an error in a file.

Type

number


maxFileSize​

Description

The Maximum size of a file to spell check. This is used to prevent spell checking very large files.

The value can be number or a string formatted <number>[units], number with optional units.

Supported units:

  • K, KB - value * 1024
  • M, MB - value * 2^20
  • G, GB - value * 2^30

Special values:

  • 0 - has the effect of removing the limit.

Examples:

  • 1000000 - 1 million bytes
  • 1000K or 1000KB - 1 thousand kilobytes
  • 0.5M or 0.5MB - 0.5 megabytes

default: no limit

Type

number,string

Since
9.4.0

maxNumberOfProblems​

Description

The maximum number of problems to report in a file.

Type

number


minRandomLength​

Description

The minimum length of a random string to be ignored.

Type

number


minWordLength​

Description

The minimum length of a word before checking it against a dictionary.

Type

number


name​

Description

Optional name of configuration.

Type

string


noConfigSearch​

Description

Prevents searching for local configuration when checking individual documents.

Type

boolean


noSuggestDictionaries​

Description

Optional list of dictionaries that will not be used for suggestions. Words in these dictionaries are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in one of these dictionaries, it will be removed from the set of possible suggestions.

Type

DictionaryReference​[]


numSuggestions​

Description

Number of suggestions to make.

Type

number


overrides​

Description

Overrides are used to apply settings for specific files in your project.

For example:

"overrides": [
// Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
{
"filename": "**/{*.hrr,*.crr}",
"languageId": "cpp"
},
// Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
{
"language": "nl",
"filename": "**/dutch/**/*.txt"
}
]
Type

OverrideSettings​[]


patterns​

Description

Defines a list of patterns that can be used with the ignoreRegExpList and includeRegExpList options.

For example:

"ignoreRegExpList": ["comments"],
"patterns": [
{
"name": "comment-single-line",
"pattern": "/#.*/g"
},
{
"name": "comment-multi-line",
"pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
},
// You can also combine multiple named patterns into one single named pattern
{
"name": "comments",
"pattern": ["comment-single-line", "comment-multi-line"]
}
]
Type

RegExpPatternDefinition​[]


pnpFiles​

Description

The PnP files to search for. Note: .mjs files are not currently supported.

Type

string​[]


readonly​

Description

Indicate that the configuration file should not be modified. This is used to prevent tools like the VS Code Spell Checker from modifying the file to add words and other configuration.

Type

boolean


reporters​

Description

Define which reports to use. default - is a special name for the default cli reporter.

Examples:

  • ["default"] - to use the default reporter
  • ["@cspell/cspell-json-reporter"] - use the cspell JSON reporter.
  • [["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]
  • [ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]] - Use both the default reporter and the cspell-json-reporter.
Type

ReporterSettings​[]


showStatus​

Description

Show status.

Type

boolean


softWordBreakDefinitions​

Description

Defines a set of word break rules that can be used for text segmentation.

Soft word breaks are done through injecting soft-hyphens at the appropriate positions in the text before spell checking.

This allows for word breaks that might not be captured by the camel case detection.

Note: soft-hyphens are removed before checking the word against the dictionaries.

For example, if there is a soft-hyphen (represented by a |) injected between error and code error|code, the following words would be checked against the dictionaries: errorcode, error, and code.

Type

SoftWordBreakDefinitions

Since
10.3.1

softWordBreaks​

Description

Allows enabling or disabling soft word break rules by name.

Type

SoftWordBreaks

Since
10.3.1

spellCheckDelayMs​

Description

Delay in ms after a document has changed before checking it for spelling errors.

Type

number


substitutionDefinitions​

Description

The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.

Type

SubstitutionDefinitions

Since
9.7.0

substitutions​

Description

The set of substitutions to apply to a document before spell checking.

Type

Substitutions

Since
9.7.0

suggestionNumChanges​

Description

The maximum number of changes allowed on a word to be considered a suggestions.

For example, appending an s onto example -> examples is considered 1 change.

Range: between 1 and 5.

Type

number


suggestionsTimeout​

Description

The maximum amount of time in milliseconds to generate suggestions for a word.

Type

number


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


unknownWords​

Description

Controls how unknown words are handled.

  • report-all - Report all unknown words (default behavior)
  • report-simple - Report unknown words that have simple spelling errors, typos, and flagged words.
  • report-common-typos - Report unknown words that are common typos and flagged words.
  • report-flagged - Report unknown words that are flagged.
Type

UnknownWordsChoices

Since
9.1.0

useGitignore​

Description

Tells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files found.

Type

boolean


useIntlWordSegmentation​

Description

Enables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc. The locale used for the segmentation is based on the language setting.

Type

boolean

Since
10.2.0

usePnP​

Description

Packages managers like Yarn 2 use a .pnp.cjs file to assist in loading packages stored in the repository.

When true, the spell checker will search up the directory structure for the existence of a PnP file and load it.

Type

boolean


userWords​

Description

Words to add to global dictionary -- should only be in the user config file.

Type

string​[]


validateDirectives​

Description

Verify that the in-document directives are correct.

Type

boolean


version​

Description

Configuration format version of the settings file.

This controls how the settings in the configuration file behave.

Type

Version


vfs​

Description

Files to add to the CSpell Virtual File System.

They can be referenced using cspell-vfs:///<module>/<path-to-file>/<file-name> URLs.

They can be referenced in the path field of dictionary definitions.

Type

CSpellVFS

Since
9.7.0

words​

Description

List of words to be considered correct.

Type

string​[]

CSpellVFS​

FieldTypeDescription

CSpellVFS Fields​


CSpellVFSData​

Description

The data content of a CSpellVFS file.

Type

CSpellVFSTextData

CSpellVFSFileEntry​

FieldTypeDescription
data reqCSpellVFSDataThe content data of the file.
encoding"base64""plaintext"
urlCSpellVFSFileUrlThe optional file vfs url. It is already part of the CSpellVFS key.

CSpellVFSFileEntry Fields​


data​

Description

The content data of the file.

Type < required >

CSpellVFSData


encoding​

Description

The encoding of the data. In most cases the encoding is determined from the data type and filename url.

Type

"base64" | "plaintext" | "utf8"


url​

Description

The optional file vfs url. It is already part of the CSpellVFS key.

Type

CSpellVFSFileUrl


CSpellVFSFileUrl​

Description

A URL string representing a CSpellVFS file. It should be of the form:

cspell-vfs:///<module>/<path-to-file>/<file-name>

Example: cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz

Type

string

Since
9.7.0

CSpellVFSTextData​

Description

Data content stored in a string for CSpellVFS file. It is often encoded (e.g. base64) binary data.

Type

string


CacheFormat​

Type

"legacy" | "universal"

CacheSettings​

FieldTypeDescription
cacheFormatCacheFormatFormat of the cache file.
cacheLocationFSPathResolvablePath to the cache location. Can be a file or a directory.
cacheStrategyCacheStrategyStrategy to use for detecting changed files, default: content
useCachebooleanStore the results of processed files in order to only operate on the changed ones.

CacheSettings Fields​


cacheFormat​

Description

Format of the cache file.

  • legacy - use absolute paths in the cache file
  • universal - use a sharable format.
Type

CacheFormat


cacheLocation​

Description

Path to the cache location. Can be a file or a directory. If none specified .cspellcache will be used. Relative paths are relative to the config file in which it is defined.

A prefix of ${cwd} is replaced with the current working directory.

Type

FSPathResolvable


cacheStrategy​

Description

Strategy to use for detecting changed files, default: content

Type

CacheStrategy


useCache​

Description

Store the results of processed files in order to only operate on the changed ones.

Type

boolean


CacheStrategy​

Description

The Strategy to use to detect if a file has changed.

  • content - uses a hash of the file content to check file changes (slower - more accurate).
  • metadata - uses the file system timestamp and size to detect changes (fastest, may not work in CI).
Type

"content" | "metadata"


CharacterSet​

Description

This is a set of characters that can include - or |

  • - - indicates a range of characters: a-c => abc
  • | - is a group separator, indicating that the characters on either side are not related.
Type

string

CharacterSetCosts​

FieldTypeDescription
characters reqCharacterSetThis is a set of characters that can include - or `
cost reqnumberthe cost to insert / delete / replace / swap the characters in a group
penaltynumberThe penalty cost to apply if the accent is used.

CharacterSetCosts Fields​


characters​

Description

This is a set of characters that can include - or |

  • - - indicates a range of characters: a-c => abc
  • | - is a group separator, indicating that the characters on either side are not related.
Type < required >

CharacterSet


cost​

Description

the cost to insert / delete / replace / swap the characters in a group

Type < required >

number


penalty​

Description

The penalty cost to apply if the accent is used. This is used to discourage

Type

number

CompatibleEngineVersions​

FieldTypeDescription
code-spell-checkerSemVersionPredicateThe VSCode Spell Checker version predicate.
cspellSemVersionPredicateCSpell version predicate.

CompatibleEngineVersions Fields​


code-spell-checker​

Description

The VSCode Spell Checker version predicate.

Type

SemVersionPredicate

Since
9.6.3

cspell​

Description

CSpell version predicate.

Type

SemVersionPredicate

Since
9.6.3

CostMapDefInsDel​

FieldTypeDescription
insDel reqnumberThe cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
map reqstringThe set of substrings to map, these are generally single character strings.
descriptionstringA description to describe the purpose of the map.
penaltynumberAdd a penalty to the final cost.
replacenumberThe cost to replace of of the substrings in the map with another substring in the map.
swapnumberThe cost to swap two adjacent substrings found in the map.

CostMapDefInsDel Fields​


insDel​

Description

The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.

Type < required >

number


map​

Description

The set of substrings to map, these are generally single character strings.

Multiple sets can be defined by using a | to separate them.

Example: "eéê|aåá" contains two different sets.

To add a multi-character substring use ().

Example: "f(ph)(gh)" results in the following set: f, ph, gh.

  • To match the beginning of a word, use ^: "(^I)"".
  • To match the end of a word, use $: "(e$)(ing$)".
Type < required >

string


description​

Description

A description to describe the purpose of the map.

Type

string


penalty​

Description

Add a penalty to the final cost. This is used to discourage certain suggestions.

Example:

# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100

This makes adding a - to the end of a word more expensive.

Think of it as taking the toll way for speed but getting the bill later.

Type

number


replace​

Description

The cost to replace of of the substrings in the map with another substring in the map. Example: Map['a', 'i'] This would be the cost to substitute a with i: Like bat to bit or the reverse.

Type

number


swap​

Description

The cost to swap two adjacent substrings found in the map. Example: Map['e', 'i'] This represents the cost to change ei to ie or the reverse.

Type

number

CostMapDefReplace​

FieldTypeDescription
map reqstringThe set of substrings to map, these are generally single character strings.
replace reqnumberThe cost to replace of of the substrings in the map with another substring in the map.
descriptionstringA description to describe the purpose of the map.
insDelnumberThe cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
penaltynumberAdd a penalty to the final cost.
swapnumberThe cost to swap two adjacent substrings found in the map.

CostMapDefReplace Fields​


map​

Description

The set of substrings to map, these are generally single character strings.

Multiple sets can be defined by using a | to separate them.

Example: "eéê|aåá" contains two different sets.

To add a multi-character substring use ().

Example: "f(ph)(gh)" results in the following set: f, ph, gh.

  • To match the beginning of a word, use ^: "(^I)"".
  • To match the end of a word, use $: "(e$)(ing$)".
Type < required >

string


replace​

Description

The cost to replace of of the substrings in the map with another substring in the map. Example: Map['a', 'i'] This would be the cost to substitute a with i: Like bat to bit or the reverse.

Type < required >

number


description​

Description

A description to describe the purpose of the map.

Type

string


insDel​

Description

The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.

Type

number


penalty​

Description

Add a penalty to the final cost. This is used to discourage certain suggestions.

Example:

# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100

This makes adding a - to the end of a word more expensive.

Think of it as taking the toll way for speed but getting the bill later.

Type

number


swap​

Description

The cost to swap two adjacent substrings found in the map. Example: Map['e', 'i'] This represents the cost to change ei to ie or the reverse.

Type

number

CostMapDefSwap​

FieldTypeDescription
map reqstringThe set of substrings to map, these are generally single character strings.
swap reqnumberThe cost to swap two adjacent substrings found in the map.
descriptionstringA description to describe the purpose of the map.
insDelnumberThe cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
penaltynumberAdd a penalty to the final cost.
replacenumberThe cost to replace of of the substrings in the map with another substring in the map.

CostMapDefSwap Fields​


map​

Description

The set of substrings to map, these are generally single character strings.

Multiple sets can be defined by using a | to separate them.

Example: "eéê|aåá" contains two different sets.

To add a multi-character substring use ().

Example: "f(ph)(gh)" results in the following set: f, ph, gh.

  • To match the beginning of a word, use ^: "(^I)"".
  • To match the end of a word, use $: "(e$)(ing$)".
Type < required >

string


swap​

Description

The cost to swap two adjacent substrings found in the map. Example: Map['e', 'i'] This represents the cost to change ei to ie or the reverse.

Type < required >

number


description​

Description

A description to describe the purpose of the map.

Type

string


insDel​

Description

The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.

Type

number


penalty​

Description

Add a penalty to the final cost. This is used to discourage certain suggestions.

Example:

# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100

This makes adding a - to the end of a word more expensive.

Think of it as taking the toll way for speed but getting the bill later.

Type

number


replace​

Description

The cost to replace of of the substrings in the map with another substring in the map. Example: Map['a', 'i'] This would be the cost to substitute a with i: Like bat to bit or the reverse.

Type

number


CustomDictionaryPath​

Description

A path or url to a custom dictionary file.

Type

string


CustomDictionaryScope​

Description

Specifies the scope of a dictionary.

Type

"user" | "workspace" | "folder"


DictionaryDefinition​

Type

DictionaryDefinitionPreferred
DictionaryDefinitionCustom
DictionaryDefinitionAugmented
DictionaryDefinitionInline
DictionaryDefinitionSimple
DictionaryDefinitionAlternate

DictionaryDefinitionAlternate​

FieldTypeDescription
file reqDictionaryPathPath to the file, only for legacy dictionary definitions.
name reqDictionaryIdThis is the name of a dictionary.
descriptionstringOptional description of the contents / purpose of the dictionary.
ignoreForbiddenWordsbooleanSome dictionaries may contain forbidden words to prevent compounding from generating
kindDictionaryKindUsed to specify the type of dictionary being referenced.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionAlternate Fields​


file​

Description

Path to the file, only for legacy dictionary definitions.

Type < required >

DictionaryPath


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


ignoreForbiddenWords​

Description

Some dictionaries may contain forbidden words to prevent compounding from generating words that are not valid in the language. These are often words that are used in other languages or might be generated through compounding. This setting allows flagged words to be ignored when checking the dictionary. The effect is similar to the word not being in the dictionary.

Type

boolean


kind​

Description

Used to specify the type of dictionary being referenced. Values:

  • words - (default) A dictionary containing words.
  • flag-words - A dictionary containing flag words. Words found in the dictionary will be treated like flagWords.
  • ignore-words - A dictionary containing words to ignore. This is the same as setting noSuggest to true.
  • suggest-words - A dictionary containing suggested word corrections. Words found in the dictionary will be treated like suggestWords.
Type

DictionaryKind

Since
10.3.0

noSuggest​

Description

Indicate that suggestions should not come from this dictionary. Words in this dictionary are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in this dictionary, it will be removed from the set of possible suggestions.

Type

boolean


repMap​

Description

Replacement pairs.

Type

ReplaceMap


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


type​

Description

Type of file:

  • S - single word per line,
  • W - each line can contain one or more words separated by space,
  • C - each line is treated like code (Camel Case is allowed).

Default is S.

C is the slowest to load due to the need to split each line based upon code splitting rules.

Note: this settings does not apply to inline dictionaries or .trie files.

Type

DictionaryFileTypes


useCompounds​

Description

Use Compounds.

Type

boolean

DictionaryDefinitionAugmented​

FieldTypeDescription
name reqDictionaryIdThis is the name of a dictionary.
path reqDictionaryPathPath or url to the dictionary file.
btrieDictionaryPathToBTrieAn alternative path to a bTrie dictionary file.
descriptionstringOptional description of the contents / purpose of the dictionary.
dictionaryInformationDictionaryInformation
ignoreForbiddenWordsbooleanSome dictionaries may contain forbidden words to prevent compounding from generating
kindDictionaryKindUsed to specify the type of dictionary being referenced.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionAugmented Fields​


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


path​

Description

Path or url to the dictionary file.

Type < required >

DictionaryPath


btrie​

Description

An alternative path to a bTrie dictionary file. It will be used in place of path if the version of CSpell being used supports btrie files.

Type

DictionaryPathToBTrie

Since
9.6.0

description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


dictionaryInformation​

Type

DictionaryInformation


ignoreForbiddenWords​

Description

Some dictionaries may contain forbidden words to prevent compounding from generating words that are not valid in the language. These are often words that are used in other languages or might be generated through compounding. This setting allows flagged words to be ignored when checking the dictionary. The effect is similar to the word not being in the dictionary.

Type

boolean


kind​

Description

Used to specify the type of dictionary being referenced. Values:

  • words - (default) A dictionary containing words.
  • flag-words - A dictionary containing flag words. Words found in the dictionary will be treated like flagWords.
  • ignore-words - A dictionary containing words to ignore. This is the same as setting noSuggest to true.
  • suggest-words - A dictionary containing suggested word corrections. Words found in the dictionary will be treated like suggestWords.
Type

DictionaryKind

Since
10.3.0

noSuggest​

Description

Indicate that suggestions should not come from this dictionary. Words in this dictionary are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in this dictionary, it will be removed from the set of possible suggestions.

Type

boolean


repMap​

Description

Replacement pairs.

Type

ReplaceMap


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


type​

Description

Type of file:

  • S - single word per line,
  • W - each line can contain one or more words separated by space,
  • C - each line is treated like code (Camel Case is allowed).

Default is S.

C is the slowest to load due to the need to split each line based upon code splitting rules.

Note: this settings does not apply to inline dictionaries or .trie files.

Type

DictionaryFileTypes


useCompounds​

Description

Use Compounds.

Type

boolean

DictionaryDefinitionCustom​

FieldTypeDescription
addWords reqbooleanWhen true, let's the spell checker know that words can be added to this dictionary.
name reqDictionaryIdThis is the name of a dictionary.
path reqCustomDictionaryPathA file path or url to a custom dictionary file.
btrieDictionaryPathToBTrieAn alternative path to a bTrie dictionary file.
descriptionstringOptional description of the contents / purpose of the dictionary.
ignoreForbiddenWordsbooleanSome dictionaries may contain forbidden words to prevent compounding from generating
kindDictionaryKindUsed to specify the type of dictionary being referenced.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
scopeCustomDictionaryScope
CustomDictionaryScope​[]
Defines the scope for when words will be added to the dictionary.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionCustom Fields​


addWords​

Description

When true, let's the spell checker know that words can be added to this dictionary.

Type < required >

boolean


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


path​

Description

A file path or url to a custom dictionary file.

Type < required >

CustomDictionaryPath


btrie​

Description

An alternative path to a bTrie dictionary file. It will be used in place of path if the version of CSpell being used supports btrie files.

Type

DictionaryPathToBTrie

Since
9.6.0

description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


ignoreForbiddenWords​

Description

Some dictionaries may contain forbidden words to prevent compounding from generating words that are not valid in the language. These are often words that are used in other languages or might be generated through compounding. This setting allows flagged words to be ignored when checking the dictionary. The effect is similar to the word not being in the dictionary.

Type

boolean


kind​

Description

Used to specify the type of dictionary being referenced. Values:

  • words - (default) A dictionary containing words.
  • flag-words - A dictionary containing flag words. Words found in the dictionary will be treated like flagWords.
  • ignore-words - A dictionary containing words to ignore. This is the same as setting noSuggest to true.
  • suggest-words - A dictionary containing suggested word corrections. Words found in the dictionary will be treated like suggestWords.
Type

DictionaryKind

Since
10.3.0

noSuggest​

Description

Indicate that suggestions should not come from this dictionary. Words in this dictionary are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in this dictionary, it will be removed from the set of possible suggestions.

Type

boolean


repMap​

Description

Replacement pairs.

Type

ReplaceMap


scope​

Description

Defines the scope for when words will be added to the dictionary.

Scope values: user, workspace, folder.

Type

CustomDictionaryScope
CustomDictionaryScope​[]


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


type​

Description

Type of file:

  • S - single word per line,
  • W - each line can contain one or more words separated by space,
  • C - each line is treated like code (Camel Case is allowed).

Default is S.

C is the slowest to load due to the need to split each line based upon code splitting rules.

Note: this settings does not apply to inline dictionaries or .trie files.

Type

DictionaryFileTypes


useCompounds​

Description

Use Compounds.

Type

boolean


DictionaryDefinitionInline​

Description

Inline Dictionary Definitions

Type

DictionaryDefinitionInlineWords
DictionaryDefinitionInlineIgnoreWords
DictionaryDefinitionInlineFlagWords
DictionaryDefinitionInlineSuggestWords

Since
6.23.0

DictionaryDefinitionInlineFlagWords​

FieldTypeDescription
flagWords reqstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
name reqDictionaryIdThis is the name of a dictionary.
descriptionstringOptional description of the contents / purpose of the dictionary.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
suggestWordsstring​[]A list of suggested replacements for words.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
wordsstring​[]List of words to be considered correct.

DictionaryDefinitionInlineFlagWords Fields​


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type < required >

string​[]


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


words​

Description

List of words to be considered correct.

Type

string​[]

DictionaryDefinitionInlineIgnoreWords​

FieldTypeDescription
ignoreWords reqstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
name reqDictionaryIdThis is the name of a dictionary.
descriptionstringOptional description of the contents / purpose of the dictionary.
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
suggestWordsstring​[]A list of suggested replacements for words.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
wordsstring​[]List of words to be considered correct.

DictionaryDefinitionInlineIgnoreWords Fields​


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type < required >

string​[]


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


words​

Description

List of words to be considered correct.

Type

string​[]

DictionaryDefinitionInlineSuggestWords​

FieldTypeDescription
name reqDictionaryIdThis is the name of a dictionary.
suggestWords reqstring​[]A list of suggested replacements for words.
descriptionstringOptional description of the contents / purpose of the dictionary.
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
wordsstring​[]List of words to be considered correct.

DictionaryDefinitionInlineSuggestWords Fields​


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type < required >

string​[]


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


words​

Description

List of words to be considered correct.

Type

string​[]

DictionaryDefinitionInlineWords​

FieldTypeDescription
name reqDictionaryIdThis is the name of a dictionary.
words reqstring​[]List of words to be considered correct.
descriptionstringOptional description of the contents / purpose of the dictionary.
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
suggestWordsstring​[]A list of suggested replacements for words.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and

DictionaryDefinitionInlineWords Fields​


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


words​

Description

List of words to be considered correct.

Type < required >

string​[]


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean

DictionaryDefinitionPreferred​

FieldTypeDescription
name reqDictionaryIdThis is the name of a dictionary.
path reqDictionaryPathPath or url to the dictionary file.
btrieDictionaryPathToBTrieAn alternative path to a bTrie dictionary file.
descriptionstringOptional description of the contents / purpose of the dictionary.
ignoreForbiddenWordsbooleanSome dictionaries may contain forbidden words to prevent compounding from generating
kindDictionaryKindUsed to specify the type of dictionary being referenced.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionPreferred Fields​


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


path​

Description

Path or url to the dictionary file.

Type < required >

DictionaryPath


btrie​

Description

An alternative path to a bTrie dictionary file. It will be used in place of path if the version of CSpell being used supports btrie files.

Type

DictionaryPathToBTrie

Since
9.6.0

description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


ignoreForbiddenWords​

Description

Some dictionaries may contain forbidden words to prevent compounding from generating words that are not valid in the language. These are often words that are used in other languages or might be generated through compounding. This setting allows flagged words to be ignored when checking the dictionary. The effect is similar to the word not being in the dictionary.

Type

boolean


kind​

Description

Used to specify the type of dictionary being referenced. Values:

  • words - (default) A dictionary containing words.
  • flag-words - A dictionary containing flag words. Words found in the dictionary will be treated like flagWords.
  • ignore-words - A dictionary containing words to ignore. This is the same as setting noSuggest to true.
  • suggest-words - A dictionary containing suggested word corrections. Words found in the dictionary will be treated like suggestWords.
Type

DictionaryKind

Since
10.3.0

noSuggest​

Description

Indicate that suggestions should not come from this dictionary. Words in this dictionary are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in this dictionary, it will be removed from the set of possible suggestions.

Type

boolean


repMap​

Description

Replacement pairs.

Type

ReplaceMap


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


type​

Description

Type of file:

  • S - single word per line,
  • W - each line can contain one or more words separated by space,
  • C - each line is treated like code (Camel Case is allowed).

Default is S.

C is the slowest to load due to the need to split each line based upon code splitting rules.

Note: this settings does not apply to inline dictionaries or .trie files.

Type

DictionaryFileTypes


useCompounds​

Description

Use Compounds.

Type

boolean

DictionaryDefinitionSimple​

FieldTypeDescription
name reqDictionaryIdThis is the name of a dictionary.
descriptionstringOptional description of the contents / purpose of the dictionary.
supportNonStrictSearchesbooleanStrip case and accents to allow for case insensitive searches and

DictionaryDefinitionSimple Fields​


name​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type < required >

DictionaryId


description​

Description

Optional description of the contents / purpose of the dictionary.

Type

string


supportNonStrictSearches​

Description

Strip case and accents to allow for case insensitive searches and words without accents.

Note: this setting only applies to word lists. It has no-impact on trie dictionaries.

Type

boolean


DictionaryFileTypes​

Type

"S" | "W" | "C" | "T"


DictionaryId​

Description

This is the name of a dictionary.

Name Format:

  • Must contain at least 1 number or letter.
  • Spaces are allowed.
  • Leading and trailing space will be removed.
  • Names ARE case-sensitive.
  • Must not contain *, !, ;, ,, {, }, [, ], ~.
Type

string

DictionaryInformation​

FieldTypeDescription
accentsCharacterSet
CharacterSetCosts​[]
The accent characters.
adjustmentsPatternAdjustment​[]A collection of patterns to test against the suggested words.
alphabetCharacterSet
CharacterSetCosts​[]
The alphabet to use.
costsEditCostsDefine edit costs.
hunspellInformationHunspellInformationUsed by dictionary authors
ignoreCharacterSetAn optional set of characters that can possibly be removed from a word before
localestringThe locale of the dictionary.
suggestionEditCostsSuggestionCostsDefsUsed in making suggestions. The lower the value, the more likely the suggestion

DictionaryInformation Fields​


accents​

Description

The accent characters.

Default: "\u0300-\u0341"

Type

CharacterSet
CharacterSetCosts​[]


adjustments​

Description

A collection of patterns to test against the suggested words. If the word matches the pattern, then the penalty is applied.

Type

PatternAdjustment​[]


alphabet​

Description

The alphabet to use.

Type

CharacterSet
CharacterSetCosts​[]


costs​

Description

Define edit costs.

Type

EditCosts


hunspellInformation​

Description

Used by dictionary authors

Type

HunspellInformation


ignore​

Description

An optional set of characters that can possibly be removed from a word before checking it.

This is useful in languages like Arabic where Harakat accents are optional.

Note: All matching characters are removed or none. Partial removal is not supported.

Type

CharacterSet


locale​

Description

The locale of the dictionary. Example: nl,nl-be

Type

string


suggestionEditCosts​

Description

Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list.

Type

SuggestionCostsDefs


DictionaryKind​

Description

The kind of dictionary.

Used to specify the type of dictionary being referenced.

Values:

  • words - A dictionary containing words.
  • flag-words - A dictionary containing flag words.
  • ignore-words - A dictionary containing words to ignore.
  • suggest-words - A dictionary containing suggested word corrections.
Type

DictionaryKindWords
DictionaryKindFlagWords
DictionaryKindIgnoreWords
DictionaryKindSuggestWords


DictionaryKindFlagWords​

Type

string


DictionaryKindIgnoreWords​

Type

string


DictionaryKindSuggestWords​

Type

string


DictionaryKindWords​

Type

string


DictionaryNegRef​

Description

This a negative reference to a named dictionary.

It is used to exclude or include a dictionary by name.

The reference starts with 1 or more !.

  • !<dictionary_name> - Used to exclude the dictionary matching <dictionary_name>.
  • !!<dictionary_name> - Used to re-include a dictionary matching <dictionary_name>. Overrides !<dictionary_name>.
  • !!!<dictionary_name> - Used to exclude a dictionary matching <dictionary_name>. Overrides !!<dictionary_name>.
Type

string


DictionaryPath​

Description

A File System Path to a dictionary file. Pattern: ^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$

Type

string


DictionaryPathToBTrie​

Description

A File System Path to a dictionary file. Pattern: ^.*\.(?:btrie)(?:\.gz)?$

Type

string

Since
9.6.0

DictionaryRef​

Description

This a reference to a named dictionary. It is expected to match the name of a dictionary.

Type

DictionaryId


DictionaryReference​

Description

Reference to a dictionary by name. One of:

Type

DictionaryRef
DictionaryNegRef

EditCosts​

FieldTypeDescription
accentCostsnumberThe cost to add / remove an accent
baseCostnumberThis is the base cost for making an edit.
capsCostsnumberThe cost to change capitalization.
firstLetterPenaltynumberThe extra cost incurred for changing the first letter of a word.
nonAlphabetCostsnumberThis is the cost for characters not in the alphabet.

EditCosts Fields​


accentCosts​

Description

The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.

Type

number


baseCost​

Description

This is the base cost for making an edit.

Type

number


capsCosts​

Description

The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.

Type

number


firstLetterPenalty​

Description

The extra cost incurred for changing the first letter of a word. This value should be less than 100 - baseCost.

Type

number


nonAlphabetCosts​

Description

This is the cost for characters not in the alphabet.

Type

number


FSPathResolvable​

Description

A File System Path.

Special Properties:

  • ${cwd} prefix - will be replaced with the current working directory.
  • Relative paths are relative to the configuration file.
Type

FsPath


FeatureEnableOnly​

Type

boolean

Features​

FieldTypeDescription
weighted-suggestionsFeatureEnableOnlyEnable/disable using weighted suggestions.

Features Fields​


weighted-suggestions​

Description

Enable/disable using weighted suggestions.

Type

FeatureEnableOnly


FsPath​

Description

A File System Path. Relative paths are relative to the configuration file.

Type

string


Glob​

Description

These are glob expressions.

Type

SimpleGlob

HunspellInformation​

FieldTypeDescription
aff reqstringSelected Hunspell AFF content.
costsobjectThe costs to apply when using the hunspell settings

HunspellInformation Fields​


aff​

Description

Selected Hunspell AFF content. The content must be UTF-8

Sections:

  • TRY
  • MAP
  • REP
  • KEY
  • ICONV
  • OCONV

Example:

# Comment
TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
MAP aàâäAÀÂÄ
MAP eéèêëEÉÈÊË
MAP iîïyIÎÏY
MAP oôöOÔÖ
MAP (IJ)(IJ)
Type < required >

string


costs​

Description

The costs to apply when using the hunspell settings

Type

object


LanguageId​

Type

LanguageIdSingle
LanguageIdMultiple
LanguageIdMultipleNeg


LanguageIdMultiple​

Description

A single string with a comma separated list of file types:

  • typescript,cpp
  • json,jsonc,yaml
  • etc.
Type

string


LanguageIdMultipleNeg​

Description

A Negative File Type used to exclude files of that type.

  • !typescript - will exclude typescript files.
  • !cpp,!json - will exclude cpp and json files.
  • !typescript,javascript - will exclude typescript files and include javascript files.
Type

string


LanguageIdSingle​

Description

A file type:

  • * - will match ALL file types.
  • typescript, cpp, json, etc.
Type

string

LanguageSetting​

FieldTypeDescription
languageId reqMatchingFileTypeThe language id. Ex: typescript, html, or php. * -- will match all languages.
allowCompoundWordsbooleanTrue to enable compound word checking.
caseSensitivebooleanDetermines if words must match case and accent rules.
descriptionstringOptional description of configuration.
dictionariesDictionaryReference​[]Optional list of dictionaries to use. Each entry should match the name of the dictionary.
dictionaryDefinitionsDictionaryDefinition​[]Define additional available dictionaries.
enabledbooleanIs the spell checker enabled.
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
idstringOptional identifier.
ignoreRegExpListRegExpPatternListList of regular expression patterns or pattern names to exclude from spell checking.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
includeRegExpListRegExpPatternListList of regular expression patterns or defined pattern names to match for spell checking.
localLocaleId
LocaleId​[]
Deprecated - The locale filter, matches against the language. This can be a comma separated list. * will match all locales.
localeLocaleId
LocaleId​[]
The locale filter, matches against the language. This can be a comma separated list. * will match all locales.
namestringOptional name of configuration.
noSuggestDictionariesDictionaryReference​[]Optional list of dictionaries that will not be used for suggestions.
patternsRegExpPatternDefinition​[]Defines a list of patterns that can be used with the ignoreRegExpList and
softWordBreakDefinitionsSoftWordBreakDefinitionsDefines a set of word break rules that can be used for text segmentation.
softWordBreaksSoftWordBreaksAllows enabling or disabling soft word break rules by name.
substitutionDefinitionsSubstitutionDefinitionsThe set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
substitutionsSubstitutionsThe set of substitutions to apply to a document before spell checking.
suggestWordsstring​[]A list of suggested replacements for words.
unknownWordsUnknownWordsChoicesControls how unknown words are handled.
useIntlWordSegmentationbooleanEnables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc.
wordsstring​[]List of words to be considered correct.

LanguageSetting Fields​


languageId​

Description

The language id. Ex: typescript, html, or php. * -- will match all languages.

Type < required >

MatchingFileType


allowCompoundWords​

Description

True to enable compound word checking.

Type

boolean


caseSensitive​

Description

Determines if words must match case and accent rules.

See Case Sensitivity for more details.

  • false - Case is ignored and accents can be missing on the entire word. Incorrect accents or partially missing accents will be marked as incorrect.
  • true - Case and accents are enforced.
Type

boolean


description​

Description

Optional description of configuration.

Type

string


dictionaries​

Description

Optional list of dictionaries to use. Each entry should match the name of the dictionary.

To remove a dictionary from the list, add ! before the name.

For example, !typescript will turn off the dictionary with the name typescript.

See the Dictionaries and Custom Dictionaries for more details.

Type

DictionaryReference​[]


dictionaryDefinitions​

Description

Define additional available dictionaries.

For example, you can use the following to add a custom dictionary:

"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Type

DictionaryDefinition​[]


enabled​

Description

Is the spell checker enabled.

Type

boolean


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


id​

Description

Optional identifier.

Type

string


ignoreRegExpList​

Description

List of regular expression patterns or pattern names to exclude from spell checking.

Example: ["href"] - to exclude html href pattern.

Regular expressions use JavaScript regular expression syntax.

Example: to ignore ALL-CAPS words

JSON

"ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]

YAML

ignoreRegExpList:
- >-
/\b[A-Z]+\b/g

By default, several patterns are excluded. See Configuration for more details.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


includeRegExpList​

Description

List of regular expression patterns or defined pattern names to match for spell checking.

If this property is defined, only text matching the included patterns will be checked.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


local​

Description

Deprecated - The locale filter, matches against the language. This can be a comma separated list. * will match all locales.

Type

LocaleId
LocaleId​[]


locale​

Description

The locale filter, matches against the language. This can be a comma separated list. * will match all locales.

Type

LocaleId
LocaleId​[]


name​

Description

Optional name of configuration.

Type

string


noSuggestDictionaries​

Description

Optional list of dictionaries that will not be used for suggestions. Words in these dictionaries are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in one of these dictionaries, it will be removed from the set of possible suggestions.

Type

DictionaryReference​[]


patterns​

Description

Defines a list of patterns that can be used with the ignoreRegExpList and includeRegExpList options.

For example:

"ignoreRegExpList": ["comments"],
"patterns": [
{
"name": "comment-single-line",
"pattern": "/#.*/g"
},
{
"name": "comment-multi-line",
"pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
},
// You can also combine multiple named patterns into one single named pattern
{
"name": "comments",
"pattern": ["comment-single-line", "comment-multi-line"]
}
]
Type

RegExpPatternDefinition​[]


softWordBreakDefinitions​

Description

Defines a set of word break rules that can be used for text segmentation.

Soft word breaks are done through injecting soft-hyphens at the appropriate positions in the text before spell checking.

This allows for word breaks that might not be captured by the camel case detection.

Note: soft-hyphens are removed before checking the word against the dictionaries.

For example, if there is a soft-hyphen (represented by a |) injected between error and code error|code, the following words would be checked against the dictionaries: errorcode, error, and code.

Type

SoftWordBreakDefinitions

Since
10.3.1

softWordBreaks​

Description

Allows enabling or disabling soft word break rules by name.

Type

SoftWordBreaks

Since
10.3.1

substitutionDefinitions​

Description

The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.

Type

SubstitutionDefinitions

Since
9.7.0

substitutions​

Description

The set of substitutions to apply to a document before spell checking.

Type

Substitutions

Since
9.7.0

suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


unknownWords​

Description

Controls how unknown words are handled.

  • report-all - Report all unknown words (default behavior)
  • report-simple - Report unknown words that have simple spelling errors, typos, and flagged words.
  • report-common-typos - Report unknown words that are common typos and flagged words.
  • report-flagged - Report unknown words that are flagged.
Type

UnknownWordsChoices

Since
9.1.0

useIntlWordSegmentation​

Description

Enables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc. The locale used for the segmentation is based on the language setting.

Type

boolean

Since
10.2.0

words​

Description

List of words to be considered correct.

Type

string​[]


LocaleId​

Description

This is a written language locale like: en, en-GB, fr, es, de or en,fr for both English and French

Type

string


MatchingFileType​

Type

LanguageId
LanguageId​[]

OverrideSettings​

FieldTypeDescription
filename reqGlob
Glob​[]
Glob pattern or patterns to match against.
allowCompoundWordsbooleanTrue to enable compound word checking.
caseSensitivebooleanDetermines if words must match case and accent rules.
descriptionstringOptional description of configuration.
dictionariesDictionaryReference​[]Optional list of dictionaries to use. Each entry should match the name of the dictionary.
dictionaryDefinitionsDictionaryDefinition​[]Define additional available dictionaries.
enabledbooleanIs the spell checker enabled.
enabledFileTypesobjectEnable / Disable checking file types (languageIds).
enabledLanguageIdsLanguageIdSingle​[]Specify a list of file types to spell check. It is better to use Settings.enabledFileTypes to Enable / Disable checking files types.
enableFiletypesLanguageIdSingle​[]Enable / Disable checking file types (languageIds).
flagWordsstring​[]List of words to always be considered incorrect. Words found in flagWords override words.
idstringOptional identifier.
ignoreRandomStringsbooleanIgnore sequences of characters that look like random strings.
ignoreRegExpListRegExpPatternListList of regular expression patterns or pattern names to exclude from spell checking.
ignoreWordsstring​[]List of words to be ignored. An ignored word will not show up as an error, even if it is
includeRegExpListRegExpPatternListList of regular expression patterns or defined pattern names to match for spell checking.
languageLocaleIdSets the locale.
languageIdMatchingFileTypeSets the programming language id to match file type.
languageSettingsLanguageSetting​[]Additional settings for individual languages.
loadDefaultConfigurationbooleanBy default, the bundled dictionary configurations are loaded. Explicitly setting this to false
maxDuplicateProblemsnumberThe maximum number of times the same word can be flagged as an error in a file.
maxFileSizenumber,stringThe Maximum size of a file to spell check. This is used to prevent spell checking very large files.
maxNumberOfProblemsnumberThe maximum number of problems to report in a file.
minRandomLengthnumberThe minimum length of a random string to be ignored.
minWordLengthnumberThe minimum length of a word before checking it against a dictionary.
namestringOptional name of configuration.
noSuggestDictionariesDictionaryReference​[]Optional list of dictionaries that will not be used for suggestions.
numSuggestionsnumberNumber of suggestions to make.
patternsRegExpPatternDefinition​[]Defines a list of patterns that can be used with the ignoreRegExpList and
pnpFilesstring​[]The PnP files to search for. Note: .mjs files are not currently supported.
softWordBreakDefinitionsSoftWordBreakDefinitionsDefines a set of word break rules that can be used for text segmentation.
softWordBreaksSoftWordBreaksAllows enabling or disabling soft word break rules by name.
substitutionDefinitionsSubstitutionDefinitionsThe set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
substitutionsSubstitutionsThe set of substitutions to apply to a document before spell checking.
suggestionNumChangesnumberThe maximum number of changes allowed on a word to be considered a suggestions.
suggestionsTimeoutnumberThe maximum amount of time in milliseconds to generate suggestions for a word.
suggestWordsstring​[]A list of suggested replacements for words.
unknownWordsUnknownWordsChoicesControls how unknown words are handled.
useIntlWordSegmentationbooleanEnables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc.
usePnPbooleanPackages managers like Yarn 2 use a .pnp.cjs file to assist in loading
wordsstring​[]List of words to be considered correct.

OverrideSettings Fields​


filename​

Description

Glob pattern or patterns to match against.

Type < required >

Glob
Glob​[]


allowCompoundWords​

Description

True to enable compound word checking.

Type

boolean


caseSensitive​

Description

Determines if words must match case and accent rules.

See Case Sensitivity for more details.

  • false - Case is ignored and accents can be missing on the entire word. Incorrect accents or partially missing accents will be marked as incorrect.
  • true - Case and accents are enforced.
Type

boolean


description​

Description

Optional description of configuration.

Type

string


dictionaries​

Description

Optional list of dictionaries to use. Each entry should match the name of the dictionary.

To remove a dictionary from the list, add ! before the name.

For example, !typescript will turn off the dictionary with the name typescript.

See the Dictionaries and Custom Dictionaries for more details.

Type

DictionaryReference​[]


dictionaryDefinitions​

Description

Define additional available dictionaries.

For example, you can use the following to add a custom dictionary:

"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Type

DictionaryDefinition​[]


enabled​

Description

Is the spell checker enabled.

Type

boolean


enabledFileTypes​

Description

Enable / Disable checking file types (languageIds).

This setting replaces: Settings.enabledLanguageIds and Settings.enableFiletypes .

A Value of:

  • true - enable checking for the file type
  • false - disable checking for the file type

A file type of * is a wildcard that enables all file types.

Example: enable all file types

File TypeEnabledComment
*trueEnable all file types.
jsonfalseDisable checking for json files.
Type

object

Since
8.8.1

enabledLanguageIds​

Description

Specify a list of file types to spell check. It is better to use Settings.enabledFileTypes to Enable / Disable checking files types.

Type

LanguageIdSingle​[]


enableFiletypes​

Description

Enable / Disable checking file types (languageIds).

These are in addition to the file types specified by Settings.enabledLanguageIds . To disable a language, prefix with ! as in !json.

Example: individual file types

jsonc // enable checking for jsonc
!json // disable checking for json
kotlin // enable checking for kotlin

Example: enable all file types

* // enable checking for all file types
!json // except for json
Type

LanguageIdSingle​[]


flagWords​

Description

List of words to always be considered incorrect. Words found in flagWords override words.

Format of flagWords

  • single word entry - word
  • with suggestions - word:suggestion or word->suggestion, suggestions

Example:

"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]

Case Sensitivity:

A word is flagged if it exactly matches an entry, or if its lowercased form exactly matches an entry. In practice this means:

  • An entry written in all lowercase (e.g. avocado) flags that word in any casing found in the document — avocado, Avocado, and AVOCADO are all flagged.
  • An entry containing any uppercase letter (e.g. Avocado) only flags that exact casing — avocado and AVOCADO are not flagged.
Type

string​[]


id​

Description

Optional identifier.

Type

string


ignoreRandomStrings​

Description

Ignore sequences of characters that look like random strings.

Type

boolean


ignoreRegExpList​

Description

List of regular expression patterns or pattern names to exclude from spell checking.

Example: ["href"] - to exclude html href pattern.

Regular expressions use JavaScript regular expression syntax.

Example: to ignore ALL-CAPS words

JSON

"ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]

YAML

ignoreRegExpList:
- >-
/\b[A-Z]+\b/g

By default, several patterns are excluded. See Configuration for more details.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


ignoreWords​

Description

List of words to be ignored. An ignored word will not show up as an error, even if it is also in the flagWords.

Type

string​[]


includeRegExpList​

Description

List of regular expression patterns or defined pattern names to match for spell checking.

If this property is defined, only text matching the included patterns will be checked.

While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.

Type

RegExpPatternList


language​

Description

Sets the locale.

Type

LocaleId


languageId​

Description

Sets the programming language id to match file type.

Type

MatchingFileType


languageSettings​

Description

Additional settings for individual languages.

See Language Settings for more details.

Type

LanguageSetting​[]


loadDefaultConfiguration​

Description

By default, the bundled dictionary configurations are loaded. Explicitly setting this to false will prevent ALL default configuration from being loaded.

Type

boolean


maxDuplicateProblems​

Description

The maximum number of times the same word can be flagged as an error in a file.

Type

number


maxFileSize​

Description

The Maximum size of a file to spell check. This is used to prevent spell checking very large files.

The value can be number or a string formatted <number>[units], number with optional units.

Supported units:

  • K, KB - value * 1024
  • M, MB - value * 2^20
  • G, GB - value * 2^30

Special values:

  • 0 - has the effect of removing the limit.

Examples:

  • 1000000 - 1 million bytes
  • 1000K or 1000KB - 1 thousand kilobytes
  • 0.5M or 0.5MB - 0.5 megabytes

default: no limit

Type

number,string

Since
9.4.0

maxNumberOfProblems​

Description

The maximum number of problems to report in a file.

Type

number


minRandomLength​

Description

The minimum length of a random string to be ignored.

Type

number


minWordLength​

Description

The minimum length of a word before checking it against a dictionary.

Type

number


name​

Description

Optional name of configuration.

Type

string


noSuggestDictionaries​

Description

Optional list of dictionaries that will not be used for suggestions. Words in these dictionaries are considered correct, but will not be used when making spell correction suggestions.

Note: if a word is suggested by another dictionary, but found in one of these dictionaries, it will be removed from the set of possible suggestions.

Type

DictionaryReference​[]


numSuggestions​

Description

Number of suggestions to make.

Type

number


patterns​

Description

Defines a list of patterns that can be used with the ignoreRegExpList and includeRegExpList options.

For example:

"ignoreRegExpList": ["comments"],
"patterns": [
{
"name": "comment-single-line",
"pattern": "/#.*/g"
},
{
"name": "comment-multi-line",
"pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
},
// You can also combine multiple named patterns into one single named pattern
{
"name": "comments",
"pattern": ["comment-single-line", "comment-multi-line"]
}
]
Type

RegExpPatternDefinition​[]


pnpFiles​

Description

The PnP files to search for. Note: .mjs files are not currently supported.

Type

string​[]


softWordBreakDefinitions​

Description

Defines a set of word break rules that can be used for text segmentation.

Soft word breaks are done through injecting soft-hyphens at the appropriate positions in the text before spell checking.

This allows for word breaks that might not be captured by the camel case detection.

Note: soft-hyphens are removed before checking the word against the dictionaries.

For example, if there is a soft-hyphen (represented by a |) injected between error and code error|code, the following words would be checked against the dictionaries: errorcode, error, and code.

Type

SoftWordBreakDefinitions

Since
10.3.1

softWordBreaks​

Description

Allows enabling or disabling soft word break rules by name.

Type

SoftWordBreaks

Since
10.3.1

substitutionDefinitions​

Description

The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.

Type

SubstitutionDefinitions

Since
9.7.0

substitutions​

Description

The set of substitutions to apply to a document before spell checking.

Type

Substitutions

Since
9.7.0

suggestionNumChanges​

Description

The maximum number of changes allowed on a word to be considered a suggestions.

For example, appending an s onto example -> examples is considered 1 change.

Range: between 1 and 5.

Type

number


suggestionsTimeout​

Description

The maximum amount of time in milliseconds to generate suggestions for a word.

Type

number


suggestWords​

Description

A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of suggestWords

  • Single suggestion (possible auto fix)
    • word: suggestion
    • word->suggestion
  • Multiple suggestions (not auto fixable)
    • word: first, second, third
    • word->first, second, third
Type

string​[]


unknownWords​

Description

Controls how unknown words are handled.

  • report-all - Report all unknown words (default behavior)
  • report-simple - Report unknown words that have simple spelling errors, typos, and flagged words.
  • report-common-typos - Report unknown words that are common typos and flagged words.
  • report-flagged - Report unknown words that are flagged.
Type

UnknownWordsChoices

Since
9.1.0

useIntlWordSegmentation​

Description

Enables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc. The locale used for the segmentation is based on the language setting.

Type

boolean

Since
10.2.0

usePnP​

Description

Packages managers like Yarn 2 use a .pnp.cjs file to assist in loading packages stored in the repository.

When true, the spell checker will search up the directory structure for the existence of a PnP file and load it.

Type

boolean


words​

Description

List of words to be considered correct.

Type

string​[]


Pattern​

Type

string

PatternAdjustment​

FieldTypeDescription
id reqstringId of the Adjustment, i.e. short-compound
penalty reqnumberThe amount of penalty to apply.
regexp reqstringRegExp pattern to match

PatternAdjustment Fields​


id​

Description

Id of the Adjustment, i.e. short-compound

Type < required >

string


penalty​

Description

The amount of penalty to apply.

Type < required >

number


regexp​

Description

RegExp pattern to match

Type < required >

string


PatternId​

Description

This matches the name in a pattern definition.

Type

string


PatternRef​

Description

A PatternRef is a Pattern or PatternId.

Type

Pattern
PatternId
PredefinedPatterns


PredefinedPatterns​

Type

"Base64" | "Base64MultiLine" | "Base64SingleLine" | "CStyleComment" | "CStyleHexValue" | "CSSHexValue" | "CommitHash" | "CommitHashLink" | "Email" | "EscapeCharacters" | "HexValues" | "href" | "PhpHereDoc" | "PublicKey" | "RsaCert" | "SshRsa" | "SHA" | "HashStrings" | "SpellCheckerDisable" | "SpellCheckerDisableBlock" | "SpellCheckerDisableLine" | "SpellCheckerDisableNext" | "SpellCheckerIgnoreInDocSetting" | "string" | "UnicodeRef" | "Urls" | "UUID" | "Everything"

RegExpPatternDefinition​

FieldTypeDescription
name reqPatternIdPattern name, used as an identifier in ignoreRegExpList and includeRegExpList.
pattern reqPattern
Pattern​[]
RegExp pattern or array of RegExp patterns.
descriptionstringDescription of the pattern.

RegExpPatternDefinition Fields​


name​

Description

Pattern name, used as an identifier in ignoreRegExpList and includeRegExpList. It is possible to redefine one of the predefined patterns to override its value.

Type < required >

PatternId


pattern​

Description

RegExp pattern or array of RegExp patterns.

Type < required >

Pattern
Pattern​[]


description​

Description

Description of the pattern.

Type

string


RegExpPatternList​

Description

A list of pattern names or regular expressions.

Type

PatternRef​[]


ReplaceEntry​

Type

string​[]


ReplaceMap​

Type

ReplaceEntry​[]


ReporterModuleName​

Description

The module or path to the the reporter to load.

Type

string


ReporterOptions​

Description

Options to send to the reporter. These are defined by the reporter.

Type

Serializable


ReporterSettings​

Description

Declare a reporter to use.

default - is a special name for the default cli reporter.

Examples:

  • "default" - to use the default reporter
  • "@cspell/cspell-json-reporter" - use the cspell JSON reporter.
  • ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]
Type

ReporterModuleName
ReporterModuleName​[]
[ReporterModuleName, ReporterOptions]


SemVersionPredicate​

Description

Semantic Version Predicate

Examples:

  • >=8
Type

string


Serializable​

Type

number
string
boolean
null
object


SimpleGlob​

Description

Simple Glob string, the root will be globRoot.

Type

string


SoftWordBreak​

Type

SoftWordBreakRegExpString
SoftWordBreakPattern

SoftWordBreakDefinitions​

FieldTypeDescription

SoftWordBreakDefinitions Fields​


SoftWordBreakPattern​

Description

Defines a word break rule based on a string.

Format:

  • "before|after" -- Matches a word break between before and after
  • "before|after$" -- Matches a word break between before and after at the end of a word
  • "^before|after" -- Matches a word break between before at the start of a word and after
  • "^before|after$" -- Matches a word break between before at the start of a word and after at the end of a word
  • "before|" -- Matches a word break after before
  • "^before|" -- Matches a word break after before at the start of a word
  • "|after" -- Matches a word break before after
  • "|after$" -- Matches a word break before after at the end of a word

Where before is the text before the word break and after is the text after the word break.

Special characters like |, ^, and $ have specific meanings.

  • | -- Represents the position of the word break
  • ^ -- Indicates the start of a word
  • $ -- Indicates the end of a word

For more complicated word break rules, consider using regular expressions with the SoftWordBreakRegExp type.

Examples:

  • "^ptr|" -- Would help with pointer definitions starting with ptr, such as ptrvalue.
  • "^I|" -- Would help with interface definitions starting with I, such as IERROR.
Type

string

Since
10.3.1

SoftWordBreakRegExpString​

Description

Represents a regular expression used for word break rules.

The matching string will be prefixed and suffixed with a soft-hyphen. If the matching string is zero length, only a single soft-hyphen will be inserted. It is best to use lookahead and lookbehind assertions to ensure correct word break positions.

Examples:

  • "/(?<=\\bptr)/" -- The break would occur after the ptr, helping with pointer definitions starting with ptr, such as ptrvalue.
  • "/(?<=\\bI)(?=[A-Z])/" -- The break would occur before an uppercase letter following an I at a word boundary, helping with interface definitions like IError.
Type

string

Since
10.3.1

SoftWordBreakRule​

Type

SoftWordBreak
SoftWordBreak​[]

SoftWordBreaks​

FieldTypeDescription

SoftWordBreaks Fields​

SubstitutionDefinition​

FieldTypeDescription
entries reqSubstitutionEntry​[]The entries for the substitution definition. This is a collection of substitution entries that can be applied to a
name reqSubstitutionIDThe name of the substitution definition. This is used to reference the substitution definition in the substitutions array.
descriptionstringAn optional description of the substitution definition. This is not used for anything, but can be useful for

SubstitutionDefinition Fields​


entries​

Description

The entries for the substitution definition. This is a collection of substitution entries that can be applied to a document before spell checking.

Type < required >

SubstitutionEntry​[]


name​

Description

The name of the substitution definition. This is used to reference the substitution definition in the substitutions array.

Type < required >

SubstitutionID


description​

Description

An optional description of the substitution definition. This is not used for anything, but can be useful for documentation purposes.

Type

string


SubstitutionDefinitions​

Description

The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.

Type

SubstitutionDefinition​[]


SubstitutionEntry​

Description

A substitution entry is a tuple of the form [find, replacement]. The find string is the string to find, and the replacement string is the string to replace it with.

  • find - The string to find. This is the string that will be replaced in the text. Only an exact match will be replaced. The find string is not treated as a regular expression.
  • replacement - The string to replace the find string with. This is the string that will be used to replace the find string in the text.
Type

[``string, string``]

Since
9.7.0

SubstitutionID​

Description

The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.

Type

string

Since
9.7.0

Substitutions​

Description

The set of substitutions to apply to a document before spell checking. This is a collection of substitution entries that can be applied to a document before spell checking.

Type

SubstitutionEntry
SubstitutionID​[]


SuggestionCostMapDef​

Description

A WeightedMapDef enables setting weights for edits between related characters and substrings.

Multiple groups can be defined using a |. A multi-character substring is defined using ().

For example, in some languages, some letters sound alike.

map: 'sc(sh)(sch)(ss)|t(tt)' # two groups.
replace: 50 # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`.

The following could be used to make inserting, removing, or replacing vowels cheaper.

map: 'aeiouy'
insDel: 50 # Make it is cheaper to insert or delete a vowel.
replace: 45 # It is even cheaper to replace one with another.

Note: the default edit distance is 100.

Type

CostMapDefReplace
CostMapDefInsDel
CostMapDefSwap


SuggestionCostsDefs​

Type

SuggestionCostMapDef​[]


UnknownWordsChoices​

Description

Possible choices for how to handle unknown words.

Type

"report-all" | "report-simple" | "report-common-typos" | "report-flagged"


Version​

Type

VersionLatest
VersionLegacy


VersionLatest​

Description

Configuration File Version.

Type

string


VersionLegacy​

Description

Legacy Configuration File Versions.

Type

string