CSpell (cspell.json)
CSpell configuration file
| Type | object |
|---|---|
| File match |
.cspell.json
cspell.json
.cSpell.json
cSpell.json
cspell.config.json
cspell.config.yaml
cspell.config.yml
cspell.yaml
cspell.yml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/cspell-cspell-json/latest.json |
| Source | https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json |
Validate with Lintel
npx @lintel/lintel check
Properties
Url to JSON Schema
True to enable compound word checking.
4 nested properties
A File System Path.
Special Properties:
${cwd}prefix - will be replaced with the current working directory.- Relative paths are relative to the configuration file.
The Strategy to use to detect if a file has changed.
content- uses a hash of the file content to check file changes (slower - more accurate).metadata- uses the file system timestamp and size to detect changes (fastest, may not work in CI).
Store the results of processed files in order to only operate on the changed ones.
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.
Optional description of configuration.
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.
Define additional available dictionaries.
For example, you can use the following to add a custom dictionary:
"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Enable / Disable checking file types (languageIds).
These are in additional to the file types specified by {@link 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
Enable scanning files and directories beginning with . (period).
By default, CSpell does not scan hidden files.
Is the spell checker enabled.
Enable / Disable checking file types (languageIds).
This setting replaces: {@link Settings.enabledLanguageIds } and {@link Settings.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 |
|---|---|---|
* | true | Enable all file types. |
json | false | Disable checking for json files. |
Specify a list of file types to spell check. It is better to use {@link Settings.enabledFileTypes } to Enable / Disable checking files types.
Engine version predicates.
This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
Features are behaviors or settings that can be explicitly configured.
1 nested properties
Glob patterns of files to be checked.
Glob patterns are relative to the globRoot of the configuration file that defines them.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
Tells the spell checker to stop searching for .gitignore files when it reaches a matching root.
A File System Path.
Special Properties:
${cwd}prefix - will be replaced with the current working directory.- Relative paths are relative to the configuration file.
Optional identifier.
Glob patterns of files to be ignored.
Glob patterns are relative to the {@link globRoot } of the configuration file that defines them.
Ignore sequences of characters that look like random strings.
A list of pattern names or regular expressions.
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
Allows this configuration to inherit configuration for one or more other files.
See Importing / Extending Configuration for more details.
A list of pattern names or regular expressions.
This is a written language locale like: en, en-GB, fr, es, de or en,fr for both English and French
Additional settings for individual languages.
See Language Settings for more details.
By default, the bundled dictionary configurations are loaded. Explicitly setting this to false
will prevent ALL default configuration from being loaded.
The maximum number of times the same word can be flagged as an error in a file.
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
The maximum number of problems to report in a file.
The minimum length of a random string to be ignored.
The minimum length of a word before checking it against a dictionary.
Optional name of configuration.
Prevents searching for local configuration when checking individual documents.
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.
Number of suggestions to make.
Overrides are used to apply settings for specific files in your project.
For example:
"overrides": [
// Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
{
"filename": "**/{*.hrr,*.crr}",
"languageId": "cpp"
},
// Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
{
"language": "nl",
"filename": "**/dutch/**/*.txt"
}
]
Defines a list of patterns that can be used with the {@link ignoreRegExpList } and {@link 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"]
}
]
The PnP files to search for. Note: .mjs files are not currently supported.
[
".pnp.js",
".pnp.cjs"
]
Indicate that the configuration file should not be modified. This is used to prevent tools like the VS Code Spell Checker from modifying the file to add words and other configuration.
Define which reports to use.
default - is a special name for the default cli reporter.
Examples:
["default"]- to use the default reporter["@cspell/cspell-json-reporter"]- use the cspell JSON reporter.[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]][ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]- Use both the default reporter and the cspell-json-reporter.
[
"default"
]
Show status.
Delay in ms after a document has changed before checking it for spelling errors.
The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
The set of substitutions to apply to a document before spell checking. This is a collection of substitution entries that can be applied to a document before spell checking.
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
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.
The maximum amount of time in milliseconds to generate suggestions for a word.
Possible choices for how to handle unknown words.
Tells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files found.
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.
Words to add to global dictionary -- should only be in the user config file.
Verify that the in-document directives are correct.
A declaration of files to add to the CSpell Virtual File System.
List of words to be considered correct.
Definitions
A declaration of files to add to the CSpell Virtual File System.
Data content stored in a string for CSpellVFS file. It is often encoded (e.g. base64) binary data.
An entry in the CSpell Virtual File System. It may or may not have a URL.
The data content of a CSpellVFS file.
The encoding of the data. In most cases the encoding is determined from the data type and filename url.
A URL string representing a CSpellVFS file. It should be of the form:
cspell-vfs:///<module>/<path-to-file>/<file-name>
Example: cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz
A URL string representing a CSpellVFS file. It should be of the form:
cspell-vfs:///<module>/<path-to-file>/<file-name>
Example: cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz
Data content stored in a string for CSpellVFS file. It is often encoded (e.g. base64) binary data.
A File System Path.
Special Properties:
${cwd}prefix - will be replaced with the current working directory.- Relative paths are relative to the configuration file.
The Strategy to use to detect if a file has changed.
content- uses a hash of the file content to check file changes (slower - more accurate).metadata- uses the file system timestamp and size to detect changes (fastest, may not work in CI).
Store the results of processed files in order to only operate on the changed ones.
The Strategy to use to detect if a file has changed.
content- uses a hash of the file content to check file changes (slower - more accurate).metadata- uses the file system timestamp and size to detect changes (fastest, may not work in CI).
This is a set of characters that can include - or |
-- indicates a range of characters:a-c=>abc|- is a group separator, indicating that the characters on either side are not related.
This is a set of characters that can include - or |
-- indicates a range of characters:a-c=>abc|- is a group separator, indicating that the characters on either side are not related.
the cost to insert / delete / replace / swap the characters in a group
The penalty cost to apply if the accent is used. This is used to discourage
The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
The set of substrings to map, these are generally single character strings.
Multiple sets can be defined by using a | to separate them.
Example: "eéê|aåá" contains two different sets.
To add a multi-character substring use ().
Example: "f(ph)(gh)" results in the following set: f, ph, gh.
- To match the beginning of a word, use
^:"(^I)"". - To match the end of a word, use
$:"(e$)(ing$)".
A description to describe the purpose of the map.
Add a penalty to the final cost. This is used to discourage certain suggestions.
Example:
# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100
This makes adding a - to the end of a word more expensive.
Think of it as taking the toll way for speed but getting the bill later.
The cost to replace of of the substrings in the map with another substring in the map.
Example: Map['a', 'i']
This would be the cost to substitute a with i: Like bat to bit or the reverse.
The cost to swap two adjacent substrings found in the map.
Example: Map['e', 'i']
This represents the cost to change ei to ie or the reverse.
The set of substrings to map, these are generally single character strings.
Multiple sets can be defined by using a | to separate them.
Example: "eéê|aåá" contains two different sets.
To add a multi-character substring use ().
Example: "f(ph)(gh)" results in the following set: f, ph, gh.
- To match the beginning of a word, use
^:"(^I)"". - To match the end of a word, use
$:"(e$)(ing$)".
The cost to replace of of the substrings in the map with another substring in the map.
Example: Map['a', 'i']
This would be the cost to substitute a with i: Like bat to bit or the reverse.
A description to describe the purpose of the map.
The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
Add a penalty to the final cost. This is used to discourage certain suggestions.
Example:
# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100
This makes adding a - to the end of a word more expensive.
Think of it as taking the toll way for speed but getting the bill later.
The cost to swap two adjacent substrings found in the map.
Example: Map['e', 'i']
This represents the cost to change ei to ie or the reverse.
The set of substrings to map, these are generally single character strings.
Multiple sets can be defined by using a | to separate them.
Example: "eéê|aåá" contains two different sets.
To add a multi-character substring use ().
Example: "f(ph)(gh)" results in the following set: f, ph, gh.
- To match the beginning of a word, use
^:"(^I)"". - To match the end of a word, use
$:"(e$)(ing$)".
The cost to swap two adjacent substrings found in the map.
Example: Map['e', 'i']
This represents the cost to change ei to ie or the reverse.
A description to describe the purpose of the map.
The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical.
Add a penalty to the final cost. This is used to discourage certain suggestions.
Example:
# Match adding/removing `-` to the end of a word.
map: "$(-$)"
replace: 50
penalty: 100
This makes adding a - to the end of a word more expensive.
Think of it as taking the toll way for speed but getting the bill later.
The cost to replace of of the substrings in the map with another substring in the map.
Example: Map['a', 'i']
This would be the cost to substitute a with i: Like bat to bit or the reverse.
A path or url to a custom dictionary file.
Specifies the scope of a dictionary.
Only for legacy dictionary definitions.
A File System Path to a dictionary file.
Pattern: ^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$
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
*,!,;,,,{,},[,],~.
Optional description of the contents / purpose of the dictionary.
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.
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.
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.
Use Compounds.
Used to provide extra data related to the dictionary
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
*,!,;,,,{,},[,],~.
A File System Path to a dictionary file.
Pattern: ^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$
A File System Path to a dictionary file.
Pattern: ^.*\.(?:btrie)(?:\.gz)?$
Optional description of the contents / purpose of the dictionary.
Use by dictionary authors to help improve the quality of suggestions given from the dictionary.
Added with v5.16.0.
8 nested properties
The accent characters.
Default: "\u0300-\u0341"
A collection of patterns to test against the suggested words. If the word matches the pattern, then the penalty is applied.
The alphabet to use.
5 nested properties
The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.
This is the base cost for making an edit.
The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.
The extra cost incurred for changing the first letter of a word.
This value should be less than 100 - baseCost.
This is the cost for characters not in the alphabet.
2 nested properties
Selected Hunspell AFF content. The content must be UTF-8
Sections:
- TRY
- MAP
- REP
- KEY
- ICONV
- OCONV
Example:
# Comment
TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
MAP aàâäAÀÂÄ
MAP eéèêëEÉÈÊË
MAP iîïyIÎÏY
MAP oôöOÔÖ
MAP (IJ)(IJ)
The costs to apply when using the hunspell settings
This is a set of characters that can include - or |
-- indicates a range of characters:a-c=>abc|- is a group separator, indicating that the characters on either side are not related.
The locale of the dictionary.
Example: nl,nl-be
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.
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.
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.
Use Compounds.
For Defining Custom dictionaries. They are generally scoped to a
user, workspace, or folder.
When addWords is true, indicates that the spell checker can add words
to the file.
Note: only plain text files with one word per line are supported at this moment.
When true, let's the spell checker know that words can be added to this dictionary.
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
*,!,;,,,{,},[,],~.
A path or url to a custom dictionary file.
A File System Path to a dictionary file.
Pattern: ^.*\.(?:btrie)(?:\.gz)?$
Optional description of the contents / purpose of the dictionary.
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.
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.
Defines the scope for when words will be added to the dictionary.
Scope values: user, workspace, folder.
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.
Use Compounds.
Inline Dictionary Definitions
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
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
*,!,;,,,{,},[,],~.
Optional description of the contents / purpose of the dictionary.
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
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
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.
List of words to be considered correct.
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
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
*,!,;,,,{,},[,],~.
Optional description of the contents / purpose of the dictionary.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
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
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.
List of words to be considered correct.
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
*,!,;,,,{,},[,],~.
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
Optional description of the contents / purpose of the dictionary.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
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.
List of words to be considered correct.
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
*,!,;,,,{,},[,],~.
List of words to be considered correct.
Optional description of the contents / purpose of the dictionary.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
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
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.
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
*,!,;,,,{,},[,],~.
A File System Path to a dictionary file.
Pattern: ^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$
A File System Path to a dictionary file.
Pattern: ^.*\.(?:btrie)(?:\.gz)?$
Optional description of the contents / purpose of the dictionary.
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.
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.
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.
Use Compounds.
An Empty Dictionary Definition
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
*,!,;,,,{,},[,],~.
Optional description of the contents / purpose of the dictionary.
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.
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
*,!,;,,,{,},[,],~.
Use by dictionary authors to help improve the quality of suggestions given from the dictionary.
Added with v5.16.0.
The accent characters.
Default: "\u0300-\u0341"
A collection of patterns to test against the suggested words. If the word matches the pattern, then the penalty is applied.
The alphabet to use.
5 nested properties
The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.
This is the base cost for making an edit.
The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.
The extra cost incurred for changing the first letter of a word.
This value should be less than 100 - baseCost.
This is the cost for characters not in the alphabet.
2 nested properties
Selected Hunspell AFF content. The content must be UTF-8
Sections:
- TRY
- MAP
- REP
- KEY
- ICONV
- OCONV
Example:
# Comment
TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
MAP aàâäAÀÂÄ
MAP eéèêëEÉÈÊË
MAP iîïyIÎÏY
MAP oôöOÔÖ
MAP (IJ)(IJ)
The costs to apply when using the hunspell settings
10 nested properties
The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.
This is the base cost for making an edit.
The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.
The extra cost incurred for changing the first letter of a word.
This value should be less than 100 - baseCost.
The cost to convert between convert pairs.
The value should be slightly higher than the mapCost.
The cost of replacing or swapping any adjacent keyboard characters.
This should be slightly cheaper than tryCharCost.
mapSet replacement cost is the cost to substitute one character with another from the same set.
Map characters are considered very similar to each other and are often the cause of simple mistakes.
This is the cost for characters not in the alphabet.
The cost to substitute pairs found in the replace settings.
The cost of inserting / deleting / or swapping any tryChars
Defaults to baseCosts
This is a set of characters that can include - or |
-- indicates a range of characters:a-c=>abc|- is a group separator, indicating that the characters on either side are not related.
The locale of the dictionary.
Example: nl,nl-be
This a negative reference to a named dictionary.
It is used to exclude or include a dictionary by name.
The reference starts with 1 or more !.
!<dictionary_name>- Used to exclude the dictionary matching<dictionary_name>.!!<dictionary_name>- Used to re-include a dictionary matching<dictionary_name>. Overrides!<dictionary_name>.!!!<dictionary_name>- Used to exclude a dictionary matching<dictionary_name>. Overrides!!<dictionary_name>.
A File System Path to a dictionary file.
Pattern: ^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$
A File System Path to a dictionary file.
Pattern: ^.*\.(?:btrie)(?:\.gz)?$
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
*,!,;,,,{,},[,],~.
Reference to a dictionary by name. One of:
- {@link DictionaryRef }
- {@link DictionaryNegRef }
The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.
This is the base cost for making an edit.
The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.
The extra cost incurred for changing the first letter of a word.
This value should be less than 100 - baseCost.
This is the cost for characters not in the alphabet.
A File System Path. Relative paths are relative to the configuration file.
Features are behaviors or settings that can be explicitly configured.
A File System Path. Relative paths are relative to the configuration file.
Simple Glob string, the root will be globRoot.
Selected Hunspell AFF content. The content must be UTF-8
Sections:
- TRY
- MAP
- REP
- KEY
- ICONV
- OCONV
Example:
# Comment
TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
MAP aàâäAÀÂÄ
MAP eéèêëEÉÈÊË
MAP iîïyIÎÏY
MAP oôöOÔÖ
MAP (IJ)(IJ)
The costs to apply when using the hunspell settings
10 nested properties
The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.
This is the base cost for making an edit.
The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.
The extra cost incurred for changing the first letter of a word.
This value should be less than 100 - baseCost.
The cost to convert between convert pairs.
The value should be slightly higher than the mapCost.
The cost of replacing or swapping any adjacent keyboard characters.
This should be slightly cheaper than tryCharCost.
mapSet replacement cost is the cost to substitute one character with another from the same set.
Map characters are considered very similar to each other and are often the cause of simple mistakes.
This is the cost for characters not in the alphabet.
The cost to substitute pairs found in the replace settings.
The cost of inserting / deleting / or swapping any tryChars
Defaults to baseCosts
A single string with a comma separated list of file types:
typescript,cppjson,jsonc,yaml- etc.
A Negative File Type used to exclude files of that type.
!typescript- will exclude typescript files.!cpp,!json- will exclude cpp and json files.!typescript,javascript- will exclude typescript files and include javascript files.
A file type:
*- will match ALL file types.typescript,cpp,json, etc.
True to enable compound word checking.
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.
Optional description of configuration.
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.
Define additional available dictionaries.
For example, you can use the following to add a custom dictionary:
"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Is the spell checker enabled.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
Optional identifier.
A list of pattern names or regular expressions.
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
A list of pattern names or regular expressions.
Deprecated - The locale filter, matches against the language. This can be a comma separated list. * will match all locales.
The locale filter, matches against the language. This can be a comma separated list. * will match all locales.
Optional name of configuration.
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.
Defines a list of patterns that can be used with the {@link ignoreRegExpList } and {@link 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"]
}
]
The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
The set of substitutions to apply to a document before spell checking. This is a collection of substitution entries that can be applied to a document before spell checking.
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
Possible choices for how to handle unknown words.
List of words to be considered correct.
This is a written language locale like: en, en-GB, fr, es, de or en,fr for both English and French
True to enable compound word checking.
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.
Optional description of configuration.
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.
Define additional available dictionaries.
For example, you can use the following to add a custom dictionary:
"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Enable / Disable checking file types (languageIds).
These are in additional to the file types specified by {@link 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
Is the spell checker enabled.
Enable / Disable checking file types (languageIds).
This setting replaces: {@link Settings.enabledLanguageIds } and {@link Settings.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 |
|---|---|---|
* | true | Enable all file types. |
json | false | Disable checking for json files. |
Specify a list of file types to spell check. It is better to use {@link Settings.enabledFileTypes } to Enable / Disable checking files types.
List of words to always be considered incorrect. Words found in flagWords override words.
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"
]
Optional identifier.
Ignore sequences of characters that look like random strings.
A list of pattern names or regular expressions.
List of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
A list of pattern names or regular expressions.
This is a written language locale like: en, en-GB, fr, es, de or en,fr for both English and French
Additional settings for individual languages.
See Language Settings for more details.
By default, the bundled dictionary configurations are loaded. Explicitly setting this to false
will prevent ALL default configuration from being loaded.
The maximum number of times the same word can be flagged as an error in a file.
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
The maximum number of problems to report in a file.
The minimum length of a random string to be ignored.
The minimum length of a word before checking it against a dictionary.
Optional name of configuration.
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.
Number of suggestions to make.
Defines a list of patterns that can be used with the {@link ignoreRegExpList } and {@link 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"]
}
]
The PnP files to search for. Note: .mjs files are not currently supported.
[
".pnp.js",
".pnp.cjs"
]
The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
The set of substitutions to apply to a document before spell checking. This is a collection of substitution entries that can be applied to a document before spell checking.
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
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.
The maximum amount of time in milliseconds to generate suggestions for a word.
Possible choices for how to handle unknown words.
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.
List of words to be considered correct.
Id of the Adjustment, i.e. short-compound
The amount of penalty to apply.
RegExp pattern to match
This matches the name in a pattern definition.
A PatternRef is a Pattern or PatternId.
A list of pattern names or regular expressions.
The module or path to the the reporter to load.
Declare a reporter to use.
default - is a special name for the default cli reporter.
Examples:
"default"- to use the default reporter"@cspell/cspell-json-reporter"- use the cspell JSON reporter.["@cspell/cspell-json-reporter", { "outFile": "out.json" }]
Semantic Version Predicate
Examples:
>=8
Simple Glob string, the root will be globRoot.
Allows for the definition of a substitution set. A substitution set is a collection of substitution entries that can be applied to a document before spell checking. This is useful for converting html entities, url encodings, or other transformations that may be necessary to get the correct text for spell checking.
Substitutions are applied based upon the longest matching find string. If there are multiple matches of the same find,
the last one in the list is used. This allows for the overriding of substitutions. For example, if you have a substitution
for & to and, and then a substitution for & to &, the & substitution will be used for the string &,
and the & substitution will be used for the string &.
The entries for the substitution definition. This is a collection of substitution entries that can be applied to a document before spell checking.
The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
An optional description of the substitution definition. This is not used for anything, but can be useful for documentation purposes.
The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
A substitution entry is a tuple of the form [find, replacement]. The find string is the string to find,
and the replacement string is the string to replace it with.
find- The string to find. This is the string that will be replaced in the text. Only an exact match will be replaced. The find string is not treated as a regular expression.replacement- The string to replace thefindstring with. This is the string that will be used to replace thefindstring in the text.
The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
The set of substitutions to apply to a document before spell checking. This is a collection of substitution entries that can be applied to a document before spell checking.
A WeightedMapDef enables setting weights for edits between related characters and substrings.
Multiple groups can be defined using a |.
A multi-character substring is defined using ().
For example, in some languages, some letters sound alike.
map: 'sc(sh)(sch)(ss)|t(tt)' # two groups.
replace: 50 # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`.
The following could be used to make inserting, removing, or replacing vowels cheaper.
map: 'aeiouy'
insDel: 50 # Make it is cheaper to insert or delete a vowel.
replace: 45 # It is even cheaper to replace one with another.
Note: the default edit distance is 100.
Possible choices for how to handle unknown words.
Configuration File Version.
Legacy Configuration File Versions.