Skip to main content

Files, Folders, and Workspaces

Settings that control which files and folders are spell checked.

SettingScopeDescription
cSpell.checkOnlyEnabledFileTypesresourceCheck Only Enabled File Types
cSpell.enabledFileTypesresourceEnabled File Types to Check
cSpell.enabledSchemeswindowSpecify Allowed Schemes
cSpell.filesresourceGlob patterns of files to be checked. Glob patterns are relative to the #cSpell.globRoot#
cSpell.globRootresourceThe root to use for glob patterns found in this configuration. Default: The current workspace…
cSpell.ignorePathsresourceGlob patterns of files to be ignored
cSpell.importresourceAllows this configuration to inherit configuration for one or more other files.
cSpell.mergeCSpellSettingsresourceSpecify if fields from .vscode/settings.json are passed to the spell checker. This only applies…
cSpell.mergeCSpellSettingsFieldsresourceSpecify which fields from .vscode/settings.json are passed to the spell checker. This only…
cSpell.noConfigSearchresourcePrevents searching for local configuration when checking individual documents.
cSpell.spellCheckOnlyWorkspaceFileswindowSpell Check Only Workspace Files
cSpell.useGitignoreresourceTells the spell checker to load .gitignore files and skip files that match the globs in the…
cSpell.usePnPresourcePackages managers like Yarn 2 use a .pnp.cjs file to assist in loading packages stored in…
cSpell.workspaceRootPathresourceWorkspace Root Folder Path

Settings

cSpell.checkOnlyEnabledFileTypes

Name

cSpell.checkOnlyEnabledFileTypes -- Check Only Enabled File Types

Description

By default, the spell checker checks only enabled file types. Use cSpell.enableFiletypes to turn on / off various file types.

When this setting is false, all file types are checked except for the ones disabled by cSpell.enabledFileTypes. See cSpell.enableFiletypes on how to disable a file type.

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


cSpell.enabledFileTypes

Name

cSpell.enabledFileTypes -- Enabled File Types to Check

Description

Enable / Disable checking file types (languageIds).

This setting replaces: cSpell.enabledLanguageIds and cSpell.enableFiletypes.

A Value of:

  • true - enable checking for the file type
  • false - disable checking for the file type

A file type of * is a wildcard that enables all file types.

Example: enable all file types

File TypeEnabledComment
*trueEnable all file types.
jsonfalseDisable checking for json files.

Type

object

Scope

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

Default

{"*":true,"markdown":true}


cSpell.enabledSchemes

Name

cSpell.enabledSchemes -- Specify Allowed Schemes

Description

Control which file schemes will be checked for spelling (VS Code must be restarted for this setting to take effect).

Some schemes have special meaning like:

  • untitled - Used for new documents that have not yet been saved
  • vscode-notebook-cell - Used for validating segments of a Notebook.
  • vscode-userdata - Needed to spell check .code-snippets
  • vscode-scm - Needed to spell check Source Control commit messages.
  • comment - Used for new comment editors.

Type

object

Scope

window - Windows (instance) specific settings which can be configured in user, workspace, or remote settings.

Default

{
"comment": true, "file": true, "gist": true, "repo": true, "sftp": true,
"untitled": true, "vscode-notebook-cell": true, "vscode-scm": true,
"vscode-userdata": true, "vscode-vfs": true, "vsls": true
}

cSpell.files

Name

cSpell.files

Description

Glob patterns of files to be checked. Glob patterns are relative to the cSpell.globRoot of the configuration file that defines them.

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

Name

cSpell.globRoot

Description

The root to use for glob patterns found in this configuration. Default: The current workspace folder. Use globRoot to define a different location. globRoot can be relative to the location of this configuration file. Defining globRoot, does not impact imported configurations.

Special Values:

  • ${workspaceFolder} - Default - globs will be relative to the current workspace folder
  • ${workspaceFolder:<name>} - Where <name> is the name of the workspace folder.

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

Name

cSpell.ignorePaths -- Glob patterns of files to be ignored

Description

Glob patterns of files to be ignored. The patterns are relative to the cSpell.globRoot of the configuration file that defines them.

Type

string[]

Scope

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

Default

[
"package-lock.json", "node_modules", "vscode-extension",
".git/{info,lfs,logs,refs,objects}/**", ".git/{index,*refs,*HEAD}", ".vscode",
".vscode-insiders"
]

cSpell.import

Name

cSpell.import

Description

Allows this configuration to inherit configuration for one or more other files.

See Importing / Extending Configuration for more details.

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

Name

cSpell.mergeCSpellSettings

Description

Specify if fields from .vscode/settings.json are passed to the spell checker. This only applies when there is a CSpell configuration file in the workspace.

The purpose of this setting to help provide a consistent result compared to the CSpell spell checker command line tool.

Values:

  • true - all settings will be merged based upon cSpell.mergeCSpellSettingsFields.
  • false - only use .vscode/settings.json if a CSpell configuration is not found.

Note: this setting is used in conjunction with cSpell.mergeCSpellSettingsFields.

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 Version

4.0.0


cSpell.mergeCSpellSettingsFields

Name

cSpell.mergeCSpellSettingsFields

Description

Specify which fields from .vscode/settings.json are passed to the spell checker. This only applies when there is a CSpell configuration file in the workspace and cSpell.mergeCSpellSettings is true.

Values:

  • { flagWords: true, userWords: false } - Always allow flagWords, but never allow userWords.

Example:

"cSpell.mergeCSpellSettingsFields": { "userWords": false }

Type

object

Scope

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

Default

{
"allowCompoundWords": true, "caseSensitive": true, "dictionaries": true,
"dictionaryDefinitions": true, "enableGlobDot": true, "features": true,
"files": true, "flagWords": true, "gitignoreRoot": true, "globRoot": true,
"ignorePaths": true, "ignoreRegExpList": true, "ignoreWords": true, "import":
true, "includeRegExpList": true, "language": true, "languageId": true,
"languageSettings": true, "loadDefaultConfiguration": true, "minWordLength":
true, "noConfigSearch": true, "noSuggestDictionaries": true, "numSuggestions":
true, "overrides": true, "patterns": true, "pnpFiles": true, "reporters": true,
"suggestWords": true, "useGitignore": true, "usePnP": true, "userWords": true,
"validateDirectives": true, "words": true
}

Since Version

4.0.0


cSpell.noConfigSearch

Name

cSpell.noConfigSearch

Description

Prevents searching for local configuration when checking individual documents.

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

Name

cSpell.spellCheckOnlyWorkspaceFiles -- Spell Check Only Workspace Files

Description

Only spell check files that are in the currently open workspace. This same effect can be achieved using the cSpell.files setting.

"cSpell.files": ["/**"]

Type

boolean

Scope

window - Windows (instance) specific settings which can be configured in user, workspace, or remote settings.

Default

false


cSpell.useGitignore

Name

cSpell.useGitignore

Description

Tells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files 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


cSpell.usePnP

Name

cSpell.usePnP

Description

Packages managers like Yarn 2 use a .pnp.cjs file to assist in loading packages stored in the repository.

When true, the spell checker will search up the directory structure for the existence of a PnP file and load it.

Type

boolean

Scope

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

Default

- none -


cSpell.workspaceRootPath

Name

cSpell.workspaceRootPath -- Workspace Root Folder Path

Description

Define the path to the workspace root folder in a multi-root workspace. By default it is the first folder.

This is used to find the cspell.json file for the workspace.

Example: use the client folder

${workspaceFolder:client}

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

Name

cSpell.allowedSchemas -- Define Allowed Schemes

Description

Control which file schemes will be checked for spelling (VS Code must be restarted for this setting to take effect).

Some schemes have special meaning like:

  • untitled - Used for new documents that have not yet been saved
  • vscode-notebook-cell - Used for validating segments of a Notebook.
  • vscode-userdata - Needed to spell check .code-snippets
  • vscode-scm - Needed to spell check Source Control commit messages.
  • comment - Used for new comment editors.

Type

string[]

Scope

window - Windows (instance) specific settings which can be configured in user, workspace, or remote settings.

Deprecation Message

  • Use #cSpell.enabledSchemes# instead.

Default

- none -


cSpell.enableFiletypes

Name

cSpell.enableFiletypes -- Enable File Types

Description

Enable / Disable checking file types (languageIds).

These are in additional to the file types specified by cSpell.enabledLanguageIds. To disable a language, prefix with ! as in !json,

Example: individual file types

jsonc       // enable checking for jsonc
!json // disable checking for json
kotlin // enable checking for kotlin

Example: enable all file types

*           // enable checking for all file types
!json // except for json

Type

string[]

Scope

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

Deprecation Message

  • Use #cSpell.enabledFileTypes# instead.

Default

- none -