@cspell/cspell-types / Exports
- AdvancedCSpellSettingsWithSourceTrace
- BaseSetting
- CSpellReporter
- CSpellReporterModule
- CSpellSettings
- CSpellSettingsWithSourceTrace
- CacheSettings
- CharacterSetCosts
- CommandLineSettings
- DictionaryDefinitionAlternate
- DictionaryDefinitionAugmented
- DictionaryDefinitionBase
- DictionaryDefinitionCustom
- DictionaryDefinitionPreferred
- DictionaryInformation
- EditCosts
- ExtendableSettings
- Features
- FileSettings
- FileSource
- ImportFileRef
- InMemorySource
- Issue
- LanguageSetting
- LanguageSettingFilterFields
- LanguageSettingFilterFieldsDeprecated
- LanguageSettingFilterFieldsPreferred
- LegacySettings
- MergeSource
- OverrideFilterFields
- OverrideSettings
- ParseResult
- ParsedText
- Parser
- Plugin
- PnPSettings
- ProgressBase
- ProgressFileBase
- ProgressFileBegin
- ProgressFileComplete
- RegExpPatternDefinition
- ReportingConfiguration
- RunResult
- Settings
- SuggestionsConfiguration
- TextDocumentOffset
- TextOffset
- WorkspaceTrustSettings
- CSpellPackageSettings
- CSpellUserSettings
- CSpellUserSettingsFields
- CSpellUserSettingsWithComments
- CacheFormat
- CacheStrategy
- CharacterSet
- CustomDictionaryPath
- CustomDictionaryScope
- DebugEmitter
- DictionaryDefinition
- DictionaryFileTypes
- DictionaryId
- DictionaryNegRef
- DictionaryPath
- DictionaryRef
- DictionaryReference
- ErrorEmitter
- ErrorLike
- FSPathResolvable
- Feature
- FsPath
- Glob
- LanguageId
- LanguageIdMultiple
- LanguageIdMultipleNeg
- LanguageIdSingle
- LocalId
- LocaleId
- MappedText
- MessageEmitter
- MessageType
- MessageTypeLookup
- ParserName
- ParserOptions
- Pattern
- PatternId
- PatternRef
- PredefinedPatterns
- ProgressEmitter
- ProgressItem
- ProgressTypes
- RegExpPatternList
- ReplaceEntry
- ReplaceMap
- ReporterSettings
- ResultEmitter
- SimpleGlob
- Source
- SpellingErrorEmitter
- SuggestionCostMapDef
- SuggestionCostsDefs
- TrustLevel
- Version
- VersionLatest
- VersionLegacy
Ƭ CSpellPackageSettings: CSpellUserSettings
These settings come from user and workspace settings.
Ƭ CSpellUserSettings: CSpellSettings
Ƭ CSpellUserSettingsFields: { [key in ConfigKeys]: key }
Ƭ CSpellUserSettingsWithComments: CSpellUserSettings
Ƭ CacheFormat: "legacy"
| "universal"
Ƭ CacheStrategy: "metadata"
| "content"
The Strategy to use to detect if a file has changed.
metadata
- uses the file system timestamp and size to detect changes (fastest).content
- uses a hash of the file content to check file changes (slower - more accurate).
Ƭ CharacterSet: string
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.
Ƭ CustomDictionaryPath: FsDictionaryPath
A File System Path to a dictionary file.
Ƭ CustomDictionaryScope: "user"
| "workspace"
| "folder"
Specifies the scope of a dictionary.
Ƭ DebugEmitter: (message
: string
) => void
▸ (message
): void
Name | Type |
---|---|
message |
string |
void
Ƭ DictionaryDefinition: DictionaryDefinitionPreferred
| DictionaryDefinitionCustom
| DictionaryDefinitionAugmented
| DictionaryDefinitionAlternate
| DictionaryDefinitionLegacy
Ƭ DictionaryFileTypes: "S"
| "W"
| "C"
| "T"
Ƭ DictionaryId: string
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
*
,!
,;
,,
,{
,}
,[
,]
,~
.
Pattern
^(?=[^!,;{}[]~\n]+$)(?=(.\w)).+$
Ƭ DictionaryNegRef: string
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>
.
Pattern
^(?=!+[^!,;{}[]~\n]+$)(?=(.\w)).+$
Ƭ DictionaryPath: string
A File System Path to a dictionary file.
Pattern
^.*.(?:txt|trie)(?:.gz)?$
Ƭ DictionaryRef: DictionaryId
This a reference to a named dictionary. It is expected to match the name of a dictionary.
Ƭ DictionaryReference: DictionaryRef
| DictionaryNegRef
Reference to a dictionary by name. One of:
Ƭ ErrorEmitter: (message
: string
, error
: ErrorLike
) => void
▸ (message
, error
): void
Name | Type |
---|---|
message |
string |
error |
ErrorLike |
void
Ƭ ErrorLike: Error
| { message
: string
; name
: string
; toString
: () => string
}
Ƭ FSPathResolvable: FsPath
A File System Path.
Special Properties:
${cwd}
prefix - will be replaced with the current working directory.- Relative paths are relative to the configuration file.
Ƭ Feature: FeatureEnableOnly
| FeatureWithConfiguration
Ƭ FsPath: string
A File System Path. Relative paths are relative to the configuration file.
Ƭ Glob: SimpleGlob
| GlobDef
These are glob expressions.
Ƭ LanguageId: LanguageIdSingle
| LanguageIdMultiple
| LanguageIdMultipleNeg
Ƭ LanguageIdMultiple: string
This can be 'typescript,cpp,json,literal haskell', etc.
Pattern
^([-\w_\s]+)(,[-\w_\s]+)*$
Ƭ LanguageIdMultipleNeg: string
This can be 'typescript,cpp,json,literal haskell', etc.
Pattern
^(![-\w_\s]+)(,![-\w_\s]+)*$
Ƭ LanguageIdSingle: string
This can be '*', 'typescript', 'cpp', 'json', etc.
Pattern
^(!?[-\w_\s]+)|(*)$
Ƭ LocalId: LocaleId
Deprecated
true
Deprecation Message
Use LocaleId
instead.
Ƭ LocaleId: string
This is a written language locale like: 'en', 'en-GB', 'fr', 'es', 'de', etc.
Ƭ MappedText: Readonly
<TransformedText
>
Ƭ MessageEmitter: (message
: string
, msgType
: MessageType
) => void
▸ (message
, msgType
): void
Name | Type |
---|---|
message |
string |
msgType |
MessageType |
void
Ƭ MessageType: "Debug"
| "Info"
| "Warning"
Ƭ MessageTypeLookup: { [key in MessageType]: key }
Ƭ ParserName: string
Ƭ ParserOptions: Record
<string
, unknown
>
Ƭ Pattern: string
| InternalRegExp
Ƭ PatternId: string
This matches the name in a pattern definition.
Ƭ PatternRef: Pattern
| PatternId
| PredefinedPatterns
A PatternRef is a Pattern or PatternId.
Ƭ PredefinedPatterns: "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"
Ƭ ProgressEmitter: (p
: ProgressItem
| ProgressFileComplete
) => void
▸ (p
): void
Name | Type |
---|---|
p |
ProgressItem | ProgressFileComplete |
void
Ƭ ProgressItem: ProgressFileBegin
| ProgressFileComplete
Ƭ ProgressTypes: "ProgressFileBegin"
| "ProgressFileComplete"
Ƭ RegExpPatternList: PatternRef
[]
A list of pattern names or regular expressions.
Ƭ ReplaceEntry: [string
, string
]
Ƭ ReplaceMap: ReplaceEntry
[]
Ƭ ReporterSettings: string
| [string
] | [string
, Serializable
]
Reporter name or reporter name + reporter config.
Ƭ ResultEmitter: (result
: RunResult
) => void
| Promise
<void
>
▸ (result
): void
| Promise
<void
>
Name | Type |
---|---|
result |
RunResult |
void
| Promise
<void
>
Ƭ SimpleGlob: string
Simple Glob string, the root will be globRoot.
Ƭ Source: FileSource
| MergeSource
| InMemorySource
| BaseSource
Ƭ SpellingErrorEmitter: (issue
: Issue
) => void
▸ (issue
): void
Name | Type |
---|---|
issue |
Issue |
void
Ƭ SuggestionCostMapDef: CostMapDefReplace
| CostMapDefInsDel
| CostMapDefSwap
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.
Ƭ SuggestionCostsDefs: SuggestionCostMapDef
[]
Ƭ TrustLevel: "trusted"
| "untrusted"
Trust Security Level.
Ƭ Version: VersionLatest
| VersionLegacy
Ƭ VersionLatest: "0.2"
Configuration File Version.
Ƭ VersionLegacy: "0.1"
Legacy Configuration File Versions.
Deprecated
true
Deprecation Message
Use 0.2
instead.
• Const
ConfigFields: CSpellUserSettingsFields
• Const
MessageTypes: MessageTypeLookup