Skip to main content

Languages and Dictionaries

Settings that control dictionaries and language preferences.

Setting

Scope

Description

cSpell.caseSensitive

resource

Determines if words must match case and accent rules.

cSpell.customDictionaries

resource

Custom Dictionaries

cSpell.dictionaries

resource

Optional list of dictionaries to use.

cSpell.dictionaryDefinitions

resource

Dictionary Definitions

cSpell.flagWords

resource

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

cSpell.ignoreWords

resource

A list of words to be ignored by the spell checker.

cSpell.language

resource

Current active spelling language.

cSpell.languageSettings

resource

Additional settings for individual programming languages and locales.

cSpell.noSuggestDictionaries

resource

Optional list of dictionaries that will not be used for suggestions. Words in these dictionaries…

cSpell.suggestWords

A list of suggested replacements for words. Suggested words provide a way to make preferred…

cSpell.useLocallyInstalledCSpellDictionaries

resource

Search for @cspell/cspell-bundled-dicts in the workspace folder and use it if found.

cSpell.userWords

resource

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

cSpell.words

resource

List of words to be considered correct.

Settings

cSpell.caseSensitive

Name

cSpell.caseSensitive

Description

Determines if words must match case and accent rules.

  • false - Case is ignored and accents can be missing on the entire word. Incorrect accents or partially missing accents will be marked as incorrect. Note: Some languages like Portuguese have case sensitivity turned on by default. You must use cSpell.languageSettings to turn it off.
  • true - Case and accents are enforced by default.

Type

boolean

Scope

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

Default

- none -


cSpell.customDictionaries

Name

cSpell.customDictionaries -- Custom Dictionaries

Description

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

Example:

"cSpell.customDictionaries": {
"project-words": {
"name": "project-words",
"path": "${workspaceRoot}/project-words.txt",
"description": "Words used in this project",
"addWords": true
},
"custom": true, // Enable the `custom` dictionary
"internal-terms": false // Disable the `internal-terms` dictionary
}

Type

CustomDictionaries

Scope

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

Default

- none -


cSpell.dictionaries

Name

cSpell.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. i.e. !typescript will turn off the dictionary with the name typescript.

Example:

// Enable `lorem-ipsum` and disable `typescript`
"cSpell.dictionaries": ["lorem-ipsum", "!typescript"]

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

Name

cSpell.dictionaryDefinitions -- Dictionary Definitions

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

Scope

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

Default

- none -


cSpell.flagWords

Name

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

Scope

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

Default

- none -


cSpell.ignoreWords

Name

cSpell.ignoreWords

Description

A list of words to be ignored by the spell checker.

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

Name

cSpell.language

Description

Current active spelling language.

Example: en-GB for British English

Example: en,nl to enable both English and Dutch

Type

string

Scope

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

Default

"en"


cSpell.languageSettings

Name

cSpell.languageSettings

Description

Additional settings for individual programming languages and locales.

Type

LanguageSetting[]

Scope

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

Default

- none -


cSpell.noSuggestDictionaries

Name

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

Scope

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

Default

- none -


cSpell.suggestWords

Name

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

Scope

- none -

Default

- none -


cSpell.useLocallyInstalledCSpellDictionaries

Name

cSpell.useLocallyInstalledCSpellDictionaries

Description

Search for @cspell/cspell-bundled-dicts in the workspace folder and use it if found.

Type

boolean

Scope

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

Default

true

Since Extension Version

4.0.0


cSpell.userWords

Name

cSpell.userWords

Description

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

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

Name

cSpell.words

Description

List of words to be considered correct.

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 -


Type Definitions

CustomDictionariesDictionary

Name

CustomDictionariesDictionary

Description

Define a custom dictionary to be included.

Type

Fields

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

name

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

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

path

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

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;
}

CustomDictionaries

Name

CustomDictionaries

Description

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

Example:

"cSpell.customDictionaries": {
"project-words": {
"name": "project-words",
"path": "${workspaceRoot}/project-words.txt",
"description": "Words used in this project",
"addWords": true
},
"custom": true, // Enable the `custom` dictionary
"internal-terms": false // Disable the `internal-terms` dictionary
}

Type

{
[key: string]: (boolean | CustomDictionariesDictionary);
}

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

softWordBreakDefinitions

Description

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

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

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

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

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

Type

{
[key: string]: (string | string[]);
}

CSpell Version

10.3.1

Name

softWordBreaks

Description

Allows enabling or disabling soft word break rules by name.

Type

{
[key: string]: boolean;
}

CSpell Version

10.3.1

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 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[]);
}[];
softWordBreakDefinitions?: {
[key: string]: (string | string[]);
};
softWordBreaks?: {
[key: string]: boolean;
};
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[];
}