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.
enableFiletypesLanguageIdSingle[]Enable / Disable checking file types (languageIds).
enableGlobDotbooleanEnable scanning files and directories beginning with . (period).
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.
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.
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 give 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.
maxNumberOfProblemsnumberThe maximum number of problems to report in a file.
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.
spellCheckDelayMsnumberDelay in ms after a document has changed before checking it for spelling errors.
suggestWordsstring[]A list of suggested replacements for words.
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.
useGitignorebooleanTells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files found.
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.
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[]


enableFiletypes

Description

Enable / Disable checking file types (languageIds).

These are in additional 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


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


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[]


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


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"
]
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, 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.

Type

Glob[]


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 give 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


maxNumberOfProblems

Description

The maximum number of problems to report in a file.

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


spellCheckDelayMs

Description

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

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[]


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


useGitignore

Description

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

Type

boolean


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


words

Description

List of words to be considered correct.

Type

string[]


CacheFormat

Type

string

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: metadata
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: metadata

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.

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

string


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
charactersCharacterSetThis is a set of characters that can include - or `
costnumberthe 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

CharacterSet


cost

Description

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

Type

number


penalty

Description

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

Type

number

CostMapDefInsDel

FieldTypeDescription
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.
mapstringThe set of substrings to map, these are generally single character strings.
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


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


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

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
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.
mapstringThe set of substrings to map, these are generally single character strings.
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.

CostMapDefReplace Fields


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


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

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

CostMapDefSwap

FieldTypeDescription
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.
mapstringThe set of substrings to map, these are generally single character strings.
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.

CostMapDefSwap Fields


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


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

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


CustomDictionaryPath

Description

A File System Path to a dictionary file.

Type

FsDictionaryPath


CustomDictionaryScope

Description

Specifies the scope of a dictionary.

Type

string


DictionaryDefinition

Type

DictionaryDefinitionPreferred
DictionaryDefinitionCustom
DictionaryDefinitionAugmented
DictionaryDefinitionInline
DictionaryDefinitionAlternate

DictionaryDefinitionAlternate

FieldTypeDescription
descriptionstringOptional description of the contents / purpose of the dictionary.
fileDictionaryPathPath to the file, only for legacy dictionary definitions.
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionAlternate Fields


description

Description

Optional description of the contents / purpose of the dictionary.

Type

string


file

Description

Path to the file, only for legacy dictionary definitions.

Type

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

DictionaryId


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


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
descriptionstringOptional description of the contents / purpose of the dictionary.
dictionaryInformationDictionaryInformation
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
pathDictionaryPathPath to the file.
repMapReplaceMapReplacement pairs.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionAugmented Fields


description

Description

Optional description of the contents / purpose of the dictionary.

Type

string


dictionaryInformation

Type

DictionaryInformation


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

DictionaryId


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


path

Description

Path to the file.

Type

DictionaryPath


repMap

Description

Replacement pairs.

Type

ReplaceMap


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
addWordsbooleanWhen true, let's the spell checker know that words can be added to this dictionary.
descriptionstringOptional description of the contents / purpose of the dictionary.
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
pathCustomDictionaryPathPath to custom dictionary text file.
repMapReplaceMapReplacement pairs.
scopeCustomDictionaryScope
CustomDictionaryScope[]
Defines the scope for when words will be added to the dictionary.
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

boolean


description

Description

Optional description of the contents / purpose of the dictionary.

Type

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

DictionaryId


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


path

Description

Path to custom dictionary text file.

Type

CustomDictionaryPath


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[]


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

DictionaryDefinitionInlineFlagWords

FieldTypeDescription
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
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
suggestWordsstring[]A list of suggested replacements for words.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.
wordsstring[]List of words to be considered correct.

DictionaryDefinitionInlineFlagWords Fields


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"
]
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[]


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

DictionaryId


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


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[]


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


words

Description

List of words to be considered correct.

Type

string[]

DictionaryDefinitionInlineIgnoreWords

FieldTypeDescription
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
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
suggestWordsstring[]A list of suggested replacements for words.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.
wordsstring[]List of words to be considered correct.

DictionaryDefinitionInlineIgnoreWords Fields


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"
]
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[]


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

DictionaryId


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


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[]


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


words

Description

List of words to be considered correct.

Type

string[]

DictionaryDefinitionInlineSuggestWords

FieldTypeDescription
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
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
suggestWordsstring[]A list of suggested replacements for words.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.
wordsstring[]List of words to be considered correct.

DictionaryDefinitionInlineSuggestWords Fields


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"
]
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[]


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

DictionaryId


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


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[]


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


words

Description

List of words to be considered correct.

Type

string[]

DictionaryDefinitionInlineWords

FieldTypeDescription
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
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
repMapReplaceMapReplacement pairs.
suggestWordsstring[]A list of suggested replacements for words.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.
wordsstring[]List of words to be considered correct.

DictionaryDefinitionInlineWords Fields


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"
]
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[]


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

DictionaryId


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


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[]


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


words

Description

List of words to be considered correct.

Type

string[]

DictionaryDefinitionPreferred

FieldTypeDescription
descriptionstringOptional description of the contents / purpose of the dictionary.
nameDictionaryIdThis is the name of a dictionary.
noSuggestbooleanIndicate that suggestions should not come from this dictionary.
pathDictionaryPathPath to the file.
repMapReplaceMapReplacement pairs.
typeDictionaryFileTypesType of file:
useCompoundsbooleanUse Compounds.

DictionaryDefinitionPreferred Fields


description

Description

Optional description of the contents / purpose of the dictionary.

Type

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

DictionaryId


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


path

Description

Path to the file.

Type

DictionaryPath


repMap

Description

Replacement pairs.

Type

ReplaceMap


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


DictionaryFileTypes

Type

string


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


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|dic)(?:\.gz)?$

Type

string


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


FsDictionaryPath

Description

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

Type

string


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
affstringSelected 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

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
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.
languageIdMatchingFileTypeThe language id. Ex: typescript, html, or php. * -- will match all languages.
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
suggestWordsstring[]A list of suggested replacements for words.
wordsstring[]List of words to be considered correct.

LanguageSetting Fields


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"
]
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


languageId

Description

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

Type

MatchingFileType


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[]


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[]


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
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.
enableFiletypesLanguageIdSingle[]Enable / Disable checking file types (languageIds).
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.
filenameGlob
Glob[]
Glob pattern or patterns to match against.
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.
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.
maxNumberOfProblemsnumberThe maximum number of problems to report in a file.
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.
suggestWordsstring[]A list of suggested replacements for words.
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.
usePnPbooleanPackages managers like Yarn 2 use a .pnp.cjs file to assist in loading
wordsstring[]List of words to be considered correct.

OverrideSettings Fields


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[]


enableFiletypes

Description

Enable / Disable checking file types (languageIds).

These are in additional 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[]


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


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[]


filename

Description

Glob pattern or patterns to match against.

Type

Glob
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"
]
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


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


maxNumberOfProblems

Description

The maximum number of problems to report in a file.

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[]


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[]


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


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
idstringId of the Adjustment, i.e. short-compound
penaltynumberThe amount of penalty to apply.
regexpstringRegExp pattern to match

PatternAdjustment Fields


id

Description

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

Type

string


penalty

Description

The amount of penalty to apply.

Type

number


regexp

Description

RegExp pattern to match

Type

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

string

RegExpPatternDefinition

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

RegExpPatternDefinition Fields


description

Description

Description of the pattern.

Type

string


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

PatternId


pattern

Description

RegExp pattern or array of RegExp patterns.

Type

Pattern
Pattern[]


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[]
Unknown[]


Serializable

Type

number
string
boolean
null
object


SimpleGlob

Description

Simple Glob string, the root will be globRoot.

Type

string


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[]


Version

Type

VersionLatest
VersionLegacy


VersionLatest

Description

Configuration File Version.

Type

string


VersionLegacy

Description

Legacy Configuration File Versions.

Type

string