Skip to main content

CSpell

Settings related to CSpell Command Line Tool.

Setting

Scope

Description

cSpell.engines

Specify compatible engine versions.

cSpell.ignoreRandomStrings

Ignore sequences of characters that look like random strings.

cSpell.ignoreRegExpList

resource

List of regular expressions or Pattern names (defined in cSpell.patterns)…

cSpell.includeRegExpList

resource

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

cSpell.maxFileSize

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

cSpell.minRandomLength

The minimum length of a random string to be ignored.

cSpell.overrides

resource

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

cSpell.patterns

resource

Defines a list of patterns that can be used with the cSpell.ignoreRegExpList

cSpell.substitutionDefinitions

The set of available substitutions. This is a collection of substitution definitions that can…

cSpell.substitutions

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

cSpell.useIntlWordSegmentation

Enables enables locale-sensitive text segmentation to support languages like Japanese, Chinese,…

cSpell.vfs

Files to add to the CSpell Virtual File System.

Settings

cSpell.engines

Name

cSpell.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

Fields

Name

code-spell-checker

Description

The VSCode Spell Checker version predicate.

Type

string

CSpell Version

9.6.3

Name

cspell

Description

CSpell version predicate.

Type

string

CSpell Version

9.6.3

{
"code-spell-checker"?: string;
cspell?: string;
[key: string]: string;
}

Scope

- none -

Default

- none -

CSpell Version

9.6.3


cSpell.ignoreRandomStrings

Name

cSpell.ignoreRandomStrings

Description

Ignore sequences of characters that look like random strings.

Type

boolean

Scope

- none -

Default

true


cSpell.ignoreRegExpList

Name

cSpell.ignoreRegExpList

Description

List of regular expressions or Pattern names (defined in cSpell.patterns) to exclude from spell checking.

  • When using the VS Code Preferences UI, it is not necessary to escape the \, VS Code takes care of that.
  • When editing the VS Code settings.json file, it is necessary to escape \. Each \ becomes \\.

The default regular expression flags are gi. Add u (gui), to enable Unicode.

VS Code UIsettings.jsonDescription
/\\[a-z]+/gi/\\\\[a-z]+/giExclude LaTeX command like \mapsto
/\b[A-Z]{3,5}\b/g/\\b[A-Z]{3,5}\\b/gExclude full-caps acronyms of 3-5 length.
CStyleCommentCStyleCommentA built in pattern

Type

string[]

Scope

resource - Resource settings, which apply to files and folders, and can be configured in all settings levels, even folder settings.

Default

- none -


cSpell.includeRegExpList

Name

cSpell.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.

Type

string[]

Scope

resource - Resource settings, which apply to files and folders, and can be configured in all settings levels, even folder settings.

Default

- none -


cSpell.maxFileSize

Name

cSpell.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

Any of:

  • number

  • string

( number | string )

Scope

- none -

Default

- none -

CSpell Version

9.4.0


cSpell.minRandomLength

Name

cSpell.minRandomLength

Description

The minimum length of a random string to be ignored.

Type

number

Scope

- none -

Default

40


cSpell.overrides

Name

cSpell.overrides

Description

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

Example:

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

Type

OverrideSettings[]

Scope

resource - Resource settings, which apply to files and folders, and can be configured in all settings levels, even folder settings.

Default

- none -


cSpell.patterns

Name

cSpell.patterns

Description

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

Example:

"cSpell.patterns": [
{
"name": "comment-single-line",
"pattern": "/#.*/g"
},
{
"name": "comment-multi-line",
"pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
}
]

Type

Array of:

Fields

Name

name (required)

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

string

Required

Yes

Name

pattern (required)

Description

RegExp pattern or array of RegExp patterns.

Type

( string | string[] )

Required

Yes

Name

description

Description

Description of the pattern.

Type

string

{
description?: string;
name: string;
pattern: (string | string[]);
}

Scope

resource - Resource settings, which apply to files and folders, and can be configured in all settings levels, even folder settings.

Default

- none -


cSpell.substitutionDefinitions

Name

cSpell.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

Array of:

Fields

Name

entries (required)

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

[ string, string ][]

Required

Yes

Name

name (required)

Description

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

Type

string

CSpell Version

9.7.0

Required

Yes

Name

description

Description

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

Type

string

{
description?: string;
entries: [string, string][];
name: string;
}

Scope

- none -

Default

- none -

CSpell Version

9.7.0


cSpell.substitutions

Name

cSpell.substitutions

Description

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

Type

( [ string, string ] | string )[]

Scope

- none -

Default

- none -

CSpell Version

9.7.0


cSpell.useIntlWordSegmentation

Name

cSpell.useIntlWordSegmentation

Description

Enables 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

Scope

- none -

Default

- none -

CSpell Version

10.2.0


cSpell.vfs

Name

cSpell.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

TypeScript:

{
[key: string]: {
data: string;
encoding?: ("base64" | "plaintext" | "utf8");
url?: string;
};
}

Scope

- none -

Default

- none -

CSpell Version

9.7.0


Type Definitions

CustomDictionary

Name

CustomDictionary

Description

Type

Fields

Name

name (required)

Description

The reference name of the dictionary.

Example: My Words or custom

If the name matches a pre-defined dictionary, it will override the pre-defined dictionary. If you use: typescript it will replace the built-in TypeScript dictionary.

Type

string

Required

Yes

Name

path (required)

Description

Define the path to the dictionary text file.

Note: if path is undefined the named dictionary is expected to be found in the dictionaryDefinitions.

File Format: Each line in the file is considered a dictionary entry.

Case is preserved while leading and trailing space is removed.

The path should be absolute, or relative to the workspace.

Example: relative to User's folder

"path": "~/dictionaries/custom_dictionary.txt"

Example: relative to the client folder in a multi-root workspace

"path": "${workspaceFolder:client}/build/custom_dictionary.txt"

Example: relative to the current workspace folder in a single-root workspace

Note: this might not work as expected in a multi-root workspace since it is based upon the relative workspace for the currently open file.

"path": "${workspaceFolder}/build/custom_dictionary.txt"

Example: relative to the workspace folder in a single-root workspace or the first folder in a multi-root workspace

"path": "./build/custom_dictionary.txt"

Type

string

Required

Yes

Name

addWords

Description

Indicate if this custom dictionary should be used to store added words.

Type

boolean

Default

true

Name

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

string

CSpell Version

9.6.0

Name

description

Description

Optional: A human readable description.

Type

string

Name

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

Name

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

( "words" | "flag-words" | "ignore-words" | "suggest-words" )

CSpell Version

10.3.0

Name

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

Name

scope

Description

Options are

  • user - words that apply to all projects and workspaces
  • workspace - words that apply to the entire workspace
  • folder - words that apply to only a workspace folder

Type

( ( "user" | "workspace" | "folder" ) | ( "user" | "workspace" | "folder" )[] )

Name

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

Default

true

TypeScript:

{
addWords?: boolean;
btrie?: string;
description?: string;
ignoreForbiddenWords?: boolean;
kind?: ("words" | "flag-words" | "ignore-words" | "suggest-words");
name: string;
noSuggest?: boolean;
path: string;
scope?: (("user" | "workspace" | "folder") | ("user" | "workspace" | "folder")[]);
supportNonStrictSearches?: boolean;
}

DictionaryDefPreferred

Name

DictionaryDefPreferred

Description

Type

Fields

Name

name (required)

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

Required

Yes

Name

path (required)

Description

Path or url to the dictionary file.

Type

string

Required

Yes

Name

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

string

CSpell Version

9.6.0

Name

description

Description

Optional description of the contents / purpose of the dictionary.

Type

string

Name

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

Name

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

( "words" | "flag-words" | "ignore-words" | "suggest-words" )

CSpell Version

10.3.0

Name

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

Name

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

Default

true

TypeScript:

{
btrie?: string;
description?: string;
ignoreForbiddenWords?: boolean;
kind?: ("words" | "flag-words" | "ignore-words" | "suggest-words");
name: string;
noSuggest?: boolean;
path: string;
supportNonStrictSearches?: boolean;
}

DictionaryDefCustom

Name

DictionaryDefCustom

Description

Type

Fields

Name

addWords (required)

Description

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

Type

boolean

Required

Yes

Name

name (required)

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

Required

Yes

Name

path (required)

Description

A file path or url to a custom dictionary file.

Type

string

Required

Yes

Name

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

string

CSpell Version

9.6.0

Name

description

Description

Optional description of the contents / purpose of the dictionary.

Type

string

Name

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

Name

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

( "words" | "flag-words" | "ignore-words" | "suggest-words" )

CSpell Version

10.3.0

Name

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

Name

scope

Description

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

Scope values: user, workspace, folder.

Type

( ( "user" | "workspace" | "folder" ) | ( "user" | "workspace" | "folder" )[] )

Name

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

Default

true

TypeScript:

{
addWords: boolean;
btrie?: string;
description?: string;
ignoreForbiddenWords?: boolean;
kind?: ("words" | "flag-words" | "ignore-words" | "suggest-words");
name: string;
noSuggest?: boolean;
path: string;
scope?: (("user" | "workspace" | "folder") | ("user" | "workspace" | "folder")[]);
supportNonStrictSearches?: boolean;
}

DictionaryDef

Name

DictionaryDef

Description

Type

Any of:

( CustomDictionary | DictionaryDefPreferred | DictionaryDefCustom )


LanguageSetting

Name

LanguageSetting

Description

Type

Fields

Name

languageId (required)
Note: Matches against languageId (File Type)

Description

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

Type

( string | string[] )

Required

Yes

Name

locale
Note: Matches against language

Description

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

Type

( string | string[] )

Name

allowCompoundWords

Description

True to enable compound word checking.

Type

boolean

Name

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

Name

description

Description

Optional description of configuration.

Type

string

Name

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

string[]

Name

dictionaryDefinitions

Description

Define custom dictionaries. If addWords is true words will be added to this dictionary.

This setting is subject to User/Workspace settings precedence rules: Visual Studio Code User and Workspace Settings.

It is better to use cSpell.customDictionaries

Example:

"cSpell.dictionaryDefinitions": [
{
"name": "project-words",
"path": "${workspaceRoot}/project-words.txt",
"description": "Words used in this project",
"addWords": true
}
]

Type

DictionaryDef[]

Name

enabled

Description

Is the spell checker enabled.

Type

boolean

Default

true

Name

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

Name

id

Description

Optional identifier.

Type

string

Name

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

( string | ( "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" ) )[]

Name

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

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

( string | ( "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" ) )[]

Name

name

Description

Optional name of configuration.

Type

string

Name

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

string[]

Name

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

{
description?: string;
name: string;
pattern: (string | string[]);
}[]

Name

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

{
description?: string;
entries: [string, string][];
name: string;
}[]

CSpell Version

9.7.0

Name

substitutions

Description

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

Type

( [ string, string ] | string )[]

CSpell Version

9.7.0

Name

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

Name

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

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

Default

"report-all"

CSpell Version

9.1.0

Name

useIntlWordSegmentation

Description

Enables 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

CSpell Version

10.2.0

Name

words

Description

List of words to be considered correct.

Type

string[]

TypeScript:

{
allowCompoundWords?: boolean;
caseSensitive?: boolean;
description?: string;
dictionaries?: string[];
dictionaryDefinitions?: DictionaryDef[];
enabled?: boolean;
flagWords?: string[];
id?: string;
ignoreRegExpList?: (string | ("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"))[];
ignoreWords?: string[];
includeRegExpList?: (string | ("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"))[];
languageId: (string | string[]);
locale?: (string | string[]);
name?: string;
noSuggestDictionaries?: string[];
patterns?: {
description?: string;
name: string;
pattern: (string | string[]);
}[];
substitutionDefinitions?: {
description?: string;
entries: [string, string][];
name: string;
}[];
substitutions?: ([string, string] | string)[];
suggestWords?: string[];
unknownWords?: ("report-all" | "report-simple" | "report-common-typos" | "report-flagged");
useIntlWordSegmentation?: boolean;
words?: string[];
}

OverrideSettings

Name

OverrideSettings

Description

Type

Fields

Name

filename (required)
Note: Selects Files

Description

The filename glob pattern to which this override applies. This is how the override determines which files it affects.

Example to set the language for all TypeScript files:

{
"filename": "**/french/**", // match all files in the french directory
"language": "fr" // Apply French language settings to all files in the french directory
}

Example to set the file type for a specific set of files:

{
"filename": "**/*.ts",
"languageId": "typescript"
}

Type

( string | string[] )

Required

Yes

Name

allowCompoundWords

Description

True to enable compound word checking.

Type

boolean

Name

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

Name

description

Description

Optional description of configuration.

Type

string

Name

diagnosticLevel

Description

The Diagnostic Severity Level determines how issues are shown in the Problems Pane and within the document. Set the level to Hint to hide the issues from the Problems Pane.

Note: cSpell.useCustomDecorations must be false to use VS Code Diagnostic Severity Levels.

See: VS Code Diagnostic Severity Level

Type

( "Error" | "Warning" | "Information" | "Hint" )

Default

"Information"

Name

diagnosticLevelFlaggedWords

Description

Flagged word issues found by the spell checker are marked with a Diagnostic Severity Level. This affects the color of the squiggle. By default, flagged words will use the same diagnostic level as general issues. Use this setting to customize them.

See: VS Code Diagnostic Severity Level

Type

( "Error" | "Warning" | "Information" | "Hint" )

Since Extension Version

4.0.0

Name

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

string[]

Name

dictionaryDefinitions

Description

Define custom dictionaries. If addWords is true words will be added to this dictionary.

This setting is subject to User/Workspace settings precedence rules: Visual Studio Code User and Workspace Settings.

It is better to use cSpell.customDictionaries

Example:

"cSpell.dictionaryDefinitions": [
{
"name": "project-words",
"path": "${workspaceRoot}/project-words.txt",
"description": "Words used in this project",
"addWords": true
}
]

Type

DictionaryDef[]

Name

enabled

Description

Is the spell checker enabled.

Type

boolean

Default

true

Name

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

{
[key: string]: boolean;
}

CSpell Version

8.8.1

Name

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

string[]

Name

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

string[]

Name

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

Name

id

Description

Optional identifier.

Type

string

Name

ignoreRandomStrings

Description

Ignore sequences of characters that look like random strings.

Type

boolean

Default

true

Name

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

( string | ( "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" ) )[]

Name

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

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

( string | ( "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" ) )[]

Name

language

Description

Sets the locale.

Type

string

Name

languageId

Description

Sets the programming language id to match file type.

Type

( string | string[] )

Name

languageSettings

Description

Additional settings for individual programming languages and locales.

Type

LanguageSetting[]

Name

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

Default

true

Name

maxDuplicateProblems

Description

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

Type

number

Default

5

Name

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 )

CSpell Version

9.4.0

Name

maxNumberOfProblems

Description

The maximum number of problems to report in a file.

Type

number

Default

10000

Name

minRandomLength

Description

The minimum length of a random string to be ignored.

Type

number

Default

40

Name

minWordLength

Description

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

Type

number

Default

4

Name

name

Description

Optional name of configuration.

Type

string

Name

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

string[]

Name

numSuggestions

Description

Number of suggestions to make.

Type

number

Default

10

Name

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

{
description?: string;
name: string;
pattern: (string | string[]);
}[]

Name

pnpFiles

Description

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

Type

string[]

Default

default
[
".pnp.js",
".pnp.cjs"
]

Name

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

{
description?: string;
entries: [string, string][];
name: string;
}[]

CSpell Version

9.7.0

Name

substitutions

Description

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

Type

( [ string, string ] | string )[]

CSpell Version

9.7.0

Name

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

Default

3

Name

suggestionsTimeout

Description

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

Type

number

Default

500

Name

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

Name

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

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

Default

"report-all"

CSpell Version

9.1.0

Name

useIntlWordSegmentation

Description

Enables 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

CSpell Version

10.2.0

Name

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

Name

words

Description

List of words to be considered correct.

Type

string[]

TypeScript:

{
allowCompoundWords?: boolean;
caseSensitive?: boolean;
description?: string;
diagnosticLevel?: ("Error" | "Warning" | "Information" | "Hint");
diagnosticLevelFlaggedWords?: ("Error" | "Warning" | "Information" | "Hint");
dictionaries?: string[];
dictionaryDefinitions?: DictionaryDef[];
enableFiletypes?: string[];
enabled?: boolean;
enabledFileTypes?: {
[key: string]: boolean;
};
enabledLanguageIds?: string[];
filename: (string | string[]);
flagWords?: string[];
id?: string;
ignoreRandomStrings?: boolean;
ignoreRegExpList?: (string | ("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"))[];
ignoreWords?: string[];
includeRegExpList?: (string | ("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"))[];
language?: string;
languageId?: (string | string[]);
languageSettings?: LanguageSetting[];
loadDefaultConfiguration?: boolean;
maxDuplicateProblems?: number;
maxFileSize?: (number | string);
maxNumberOfProblems?: number;
minRandomLength?: number;
minWordLength?: number;
name?: string;
noSuggestDictionaries?: string[];
numSuggestions?: number;
patterns?: {
description?: string;
name: string;
pattern: (string | string[]);
}[];
pnpFiles?: string[];
substitutionDefinitions?: {
description?: string;
entries: [string, string][];
name: string;
}[];
substitutions?: ([string, string] | string)[];
suggestWords?: string[];
suggestionNumChanges?: number;
suggestionsTimeout?: number;
unknownWords?: ("report-all" | "report-simple" | "report-common-typos" | "report-flagged");
useIntlWordSegmentation?: boolean;
usePnP?: boolean;
words?: string[];
}