streetsidesoftware / vscode-spell-checker

A simple source code spell checker for code
https://streetsidesoftware.github.io/vscode-spell-checker/
Other
1.43k stars 128 forks source link

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

Open Ofer-Gal opened 3 months ago

Ofer-Gal commented 3 months ago

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

Jason3S commented 3 months ago

@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