Skip to main content

CSpell

Settings related to CSpell Command Line Tool.

SettingScopeDescription
cSpell.ignoreRegExpListresourceList of regular expressions or Pattern names (defined in #cSpell.patterns#) to exclude from…
cSpell.includeRegExpListresourceList of regular expression patterns or defined pattern names to match for spell checking.
cSpell.overridesresourceOverrides are used to apply settings for specific files in your project.
cSpell.patternsresourceDefines a list of patterns that can be used with the #cSpell.ignoreRegExpList# and #cSpell.includeRegExpList#

Settings

cSpell.ignoreRegExpList

Name

cSpell.ignoreRegExpList

Description

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

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

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

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

Type

string[]

Scope

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

Default

- none -


cSpell.includeRegExpList

Name

cSpell.includeRegExpList

Description

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

If this property is defined, only text matching the included patterns will be checked.

Type

string[]

Scope

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

Default

- none -


cSpell.overrides

Name

cSpell.overrides

Description

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

Example:

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

Type

object[]

Scope

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

Default

- none -


cSpell.patterns

Name

cSpell.patterns

Description

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

Example:

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

Type

object[]

Scope

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

Default

- none -