vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

Spell Check only words inside ``, "", '' or Notes

Open Ofer-Gal opened this issue 1 year ago • 1 comments

How can I set the spell checker to check only what is a static string or in the notes?

Ofer-Gal avatar Aug 09 '24 14:08 Ofer-Gal

@Ofer-Gal,

Similar to #150, #116, #2651.

It is possible to limit what is spell checked by using Regular Expressions. It isn't perfect, but it works in most cases.

Please see: README.md#predefined-regexp-expressions

.vscode/settings.json

{
    "cSpell.languageSettings": [
        {
            "languageId": "typescript,javascript", // file type.
            "includeRegExpList": ["string", "CStyleComment"] // string is predefined.
        }
    ]
}

In the preview version of the Extension there is a Trace mode that will show you what is spell checked by fading everything that isn't checked: F1 -> Spell Trace

image

Off: image

On: image

Jason3S avatar Aug 12 '24 12:08 Jason3S