CSpell
Settings related to CSpell Command Line Tool.
Setting | Scope | Description |
|---|---|---|
Specify compatible engine versions. | ||
Ignore sequences of characters that look like random strings. | ||
resource | List of regular expressions or Pattern names (defined in | |
resource | List of regular expression patterns or defined pattern names to match for spell checking. | |
The Maximum size of a file to spell check. This is used to prevent spell checking very large… | ||
The minimum length of a random string to be ignored. | ||
resource | Overrides are used to apply settings for specific files in your project. | |
resource | Defines a list of patterns that can be used with the | |
The set of available substitutions. This is a collection of substitution definitions that can… | ||
The set of substitutions to apply to a document before spell checking. | ||
Enables enables locale-sensitive text segmentation to support languages like Japanese, Chinese,… | ||
Files to add to the CSpell Virtual File System. |
Settings
cSpell.engines
Name
cSpell.enginesDescription
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-checkerDescription
The VSCode Spell Checker version predicate.
Type
stringCSpell Version
9.6.3
Name
cspellDescription
CSpell version predicate.
Type
stringCSpell 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.ignoreRandomStringsDescription
Ignore sequences of characters that look like random strings.
Type
booleanScope
- none -
Default
true
cSpell.ignoreRegExpList
Name
cSpell.ignoreRegExpListDescription
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.jsonfile, it is necessary to escape\. Each\becomes\\.
The default regular expression flags are
gi. Addu(gui), to enable Unicode.VS Code UI settings.json Description /\\[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 - When using the VS Code Preferences UI, it is not necessary to escape the
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.includeRegExpListDescription
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.maxFileSizeDescription
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 bytes1000Kor1000KB- 1 thousand kilobytes0.5Mor0.5MB- 0.5 megabytes
default: no limit
Type
Any of:
numberstring
( number | string )Scope
- none -
Default
- none -
CSpell Version
9.4.0
cSpell.minRandomLength
Name
cSpell.minRandomLengthDescription
The minimum length of a random string to be ignored.
Type
numberScope
- none -
Default
40
cSpell.overrides
Name
cSpell.overridesDescription
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
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.patternsDescription
Defines a list of patterns that can be used with the
cSpell.ignoreRegExpListandcSpell.includeRegExpListoptions.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
stringRequired
Yes
Name
pattern(required)Description
RegExp pattern or array of RegExp patterns.
Type
( string | string[] )Required
Yes
Name
descriptionDescription
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.substitutionDefinitionsDescription
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
stringCSpell Version
9.7.0
Required
Yes
Name
descriptionDescription
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.substitutionsDescription
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.useIntlWordSegmentationDescription
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
languagesetting.Type
booleanScope
- none -
Default
- none -
CSpell Version
10.2.0
cSpell.vfs
Name
cSpell.vfsDescription
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
pathfield 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 WordsorcustomIf the name matches a pre-defined dictionary, it will override the pre-defined dictionary. If you use:
typescriptit will replace the built-in TypeScript dictionary.Type
stringRequired
Yes
Name
path(required)Description
Define the path to the dictionary text file.
Note: if path is
undefinedthenamed dictionary is expected to be found in thedictionaryDefinitions.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
clientfolder 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
stringRequired
Yes
Name
addWordsDescription
Indicate if this custom dictionary should be used to store added words.
Type
booleanDefault
true
Name
btrieDescription
An alternative path to a bTrie dictionary file. It will be used in place of
pathif the version of CSpell being used supports btrie files.Type
stringCSpell Version
9.6.0
Name
descriptionDescription
Optional: A human readable description.
Type
string
Name
ignoreForbiddenWordsDescription
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
kindDescription
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 likeflagWords.ignore-words- A dictionary containing words to ignore. This is the same as settingnoSuggesttotrue.suggest-words- A dictionary containing suggested word corrections. Words found in the dictionary will be treated likesuggestWords.
Type
( "words" | "flag-words" | "ignore-words" | "suggest-words" )CSpell Version
10.3.0
Name
noSuggestDescription
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
scopeDescription
Options are
user- words that apply to all projects and workspacesworkspace- words that apply to the entire workspacefolder- words that apply to only a workspace folder
Type
( ( "user" | "workspace" | "folder" ) | ( "user" | "workspace" | "folder" )[] )
Name
supportNonStrictSearchesDescription
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
booleanDefault
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
stringRequired
Yes
Name
path(required)Description
Path or url to the dictionary file.
Type
stringRequired
Yes
Name
btrieDescription
An alternative path to a bTrie dictionary file. It will be used in place of
pathif the version of CSpell being used supports btrie files.Type
stringCSpell Version
9.6.0
Name
descriptionDescription
Optional description of the contents / purpose of the dictionary.
Type
string
Name
ignoreForbiddenWordsDescription
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
kindDescription
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 likeflagWords.ignore-words- A dictionary containing words to ignore. This is the same as settingnoSuggesttotrue.suggest-words- A dictionary containing suggested word corrections. Words found in the dictionary will be treated likesuggestWords.
Type
( "words" | "flag-words" | "ignore-words" | "suggest-words" )CSpell Version
10.3.0
Name
noSuggestDescription
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
supportNonStrictSearchesDescription
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
booleanDefault
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
booleanRequired
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
stringRequired
Yes
Name
path(required)Description
A file path or url to a custom dictionary file.
Type
stringRequired
Yes
Name
btrieDescription
An alternative path to a bTrie dictionary file. It will be used in place of
pathif the version of CSpell being used supports btrie files.Type
stringCSpell Version
9.6.0
Name
descriptionDescription
Optional description of the contents / purpose of the dictionary.
Type
string
Name
ignoreForbiddenWordsDescription
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
kindDescription
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 likeflagWords.ignore-words- A dictionary containing words to ignore. This is the same as settingnoSuggesttotrue.suggest-words- A dictionary containing suggested word corrections. Words found in the dictionary will be treated likesuggestWords.
Type
( "words" | "flag-words" | "ignore-words" | "suggest-words" )CSpell Version
10.3.0
Name
noSuggestDescription
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
scopeDescription
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
supportNonStrictSearchesDescription
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
booleanDefault
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 againstlanguageId(File Type)Description
The language id. Ex:
typescript,html, orphp.*-- will match all languages.Type
( string | string[] )Required
Yes
Name
locale
Note: Matches againstlanguageDescription
The locale filter, matches against the language. This can be a comma separated list.
*will match all locales.Type
( string | string[] )
Name
allowCompoundWordsDescription
True to enable compound word checking.
Type
boolean
Name
caseSensitiveDescription
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
descriptionDescription
Optional description of configuration.
Type
string
Name
dictionariesDescription
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,
!typescriptwill turn off the dictionary with the nametypescript.See the Dictionaries and Custom Dictionaries for more details.
Type
string[]
Name
dictionaryDefinitionsDescription
Define custom dictionaries. If
addWordsistruewords 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.customDictionariesExample:
"cSpell.dictionaryDefinitions": [{"name": "project-words","path": "${workspaceRoot}/project-words.txt","description": "Words used in this project","addWords": true}]Type
Name
enabledDescription
Is the spell checker enabled.
Type
booleanDefault
true
Name
flagWordsDescription
List of words to always be considered incorrect. Words found in
flagWordsoverridewords.Format of
flagWords- single word entry -
word - with suggestions -
word:suggestionorword->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, andAVOCADOare all flagged. - An entry containing any uppercase letter (e.g.
Avocado) only flags that exact casing —avocadoandAVOCADOare not flagged.
- single word entry -
Type
string[]
Name
idDescription
Optional identifier.
Type
string
Name
ignoreRegExpListDescription
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/gBy 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
ignoreWordsDescription
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
includeRegExpListDescription
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
nameDescription
Optional name of configuration.
Type
string
Name
noSuggestDictionariesDescription
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
patternsDescription
Defines a list of patterns that can be used with the
ignoreRegExpListandincludeRegExpListoptions.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
substitutionDefinitionsDescription
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
substitutionsDescription
The set of substitutions to apply to a document before spell checking.
Type
( [ string, string ] | string )[]CSpell Version
9.7.0
Name
suggestWordsDescription
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: suggestionword->suggestion
- Multiple suggestions (not auto fixable)
word: first, second, thirdword->first, second, third
- Single suggestion (possible auto fix)
Type
string[]
Name
unknownWordsDescription
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
useIntlWordSegmentationDescription
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
languagesetting.Type
booleanCSpell Version
10.2.0
Name
wordsDescription
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 FilesDescription
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
allowCompoundWordsDescription
True to enable compound word checking.
Type
boolean
Name
caseSensitiveDescription
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
descriptionDescription
Optional description of configuration.
Type
string
Name
diagnosticLevelDescription
The Diagnostic Severity Level determines how issues are shown in the Problems Pane and within the document. Set the level to
Hintto hide the issues from the Problems Pane.Note:
cSpell.useCustomDecorationsmust befalseto use VS Code Diagnostic Severity Levels.Type
( "Error" | "Warning" | "Information" | "Hint" )Default
"Information"
Name
diagnosticLevelFlaggedWordsDescription
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.
Type
( "Error" | "Warning" | "Information" | "Hint" )Since Extension Version
4.0.0
Name
dictionariesDescription
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,
!typescriptwill turn off the dictionary with the nametypescript.See the Dictionaries and Custom Dictionaries for more details.
Type
string[]
Name
dictionaryDefinitionsDescription
Define custom dictionaries. If
addWordsistruewords 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.customDictionariesExample:
"cSpell.dictionaryDefinitions": [{"name": "project-words","path": "${workspaceRoot}/project-words.txt","description": "Words used in this project","addWords": true}]Type
Name
enabledDescription
Is the spell checker enabled.
Type
booleanDefault
true
Name
enabledFileTypesDescription
Enable / Disable checking file types (languageIds).
This setting replaces:
Settings.enabledLanguageIdsandSettings.enableFiletypes.A Value of:
true- enable checking for the file typefalse- disable checking for the file type
A file type of
*is a wildcard that enables all file types.Example: enable all file types
File Type Enabled Comment *trueEnable all file types. jsonfalseDisable checking for json files. Type
- {[key: string]: boolean;}
CSpell Version
8.8.1
Name
enabledLanguageIdsDescription
Specify a list of file types to spell check. It is better to use
Settings.enabledFileTypesto Enable / Disable checking files types.Type
string[]
Name
enableFiletypesDescription
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 jsonkotlin // enable checking for kotlinExample: enable all file types
* // enable checking for all file types!json // except for jsonType
string[]
Name
flagWordsDescription
List of words to always be considered incorrect. Words found in
flagWordsoverridewords.Format of
flagWords- single word entry -
word - with suggestions -
word:suggestionorword->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, andAVOCADOare all flagged. - An entry containing any uppercase letter (e.g.
Avocado) only flags that exact casing —avocadoandAVOCADOare not flagged.
- single word entry -
Type
string[]
Name
idDescription
Optional identifier.
Type
string
Name
ignoreRandomStringsDescription
Ignore sequences of characters that look like random strings.
Type
booleanDefault
true
Name
ignoreRegExpListDescription
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/gBy 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
ignoreWordsDescription
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
includeRegExpListDescription
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
languageDescription
Sets the locale.
Type
string
Name
languageIdDescription
Sets the programming language id to match file type.
Type
( string | string[] )
Name
languageSettingsDescription
Additional settings for individual programming languages and locales.
Type
Name
loadDefaultConfigurationDescription
By default, the bundled dictionary configurations are loaded. Explicitly setting this to
falsewill prevent ALL default configuration from being loaded.Type
booleanDefault
true
Name
maxDuplicateProblemsDescription
The maximum number of times the same word can be flagged as an error in a file.
Type
numberDefault
5
Name
maxFileSizeDescription
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 bytes1000Kor1000KB- 1 thousand kilobytes0.5Mor0.5MB- 0.5 megabytes
default: no limit
Type
( number | string )CSpell Version
9.4.0
Name
maxNumberOfProblemsDescription
The maximum number of problems to report in a file.
Type
numberDefault
10000
Name
minRandomLengthDescription
The minimum length of a random string to be ignored.
Type
numberDefault
40
Name
minWordLengthDescription
The minimum length of a word before checking it against a dictionary.
Type
numberDefault
4
Name
nameDescription
Optional name of configuration.
Type
string
Name
noSuggestDictionariesDescription
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
numSuggestionsDescription
Number of suggestions to make.
Type
numberDefault
10
Name
patternsDescription
Defines a list of patterns that can be used with the
ignoreRegExpListandincludeRegExpListoptions.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
pnpFilesDescription
The PnP files to search for. Note:
.mjsfiles are not currently supported.Type
string[]Default
- default[".pnp.js",".pnp.cjs"]
Name
substitutionDefinitionsDescription
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
substitutionsDescription
The set of substitutions to apply to a document before spell checking.
Type
( [ string, string ] | string )[]CSpell Version
9.7.0
Name
suggestionNumChangesDescription
The maximum number of changes allowed on a word to be considered a suggestions.
For example, appending an
sontoexample->examplesis considered 1 change.Range: between 1 and 5.
Type
numberDefault
3
Name
suggestionsTimeoutDescription
The maximum amount of time in milliseconds to generate suggestions for a word.
Type
numberDefault
500
Name
suggestWordsDescription
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: suggestionword->suggestion
- Multiple suggestions (not auto fixable)
word: first, second, thirdword->first, second, third
- Single suggestion (possible auto fix)
Type
string[]
Name
unknownWordsDescription
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
useIntlWordSegmentationDescription
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
languagesetting.Type
booleanCSpell Version
10.2.0
Name
usePnPDescription
Packages managers like Yarn 2 use a
.pnp.cjsfile 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
wordsDescription
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[];}