streetsidesoftware / vscode-spell-checker

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

Re-add ability to only enable for certain file types? #3800

Open dsherret opened 4 hours ago

dsherret commented 4 hours ago

Previously I had the following in my user settings:

    "cSpell.enabledLanguageIds": [
        "markdown",
        "text"
    ],

This stopped working, and i see it recommend to use the new setting, so I upgraded:

    "cSpell.enabledFileTypes": {
        "markdown": true,
        "text": true
    },

But it doesn't disable the checking in other files, so I tried doing:

"cSpell.enabledFileTypes": {
        "*": false,
        "markdown": true,
        "text": true
    },

...but this doesn't work, so I updated to this:

"cSpell.enabledFileTypes": {
        "al": false,
        "asciidoc": false,
        "bat": false,
        "c": false,
        "clojure": false,
        "coffeescript": false,
        "cpp": false,
        "csharp": false,
        "css": false,
        "dart": false,
        "diff": false,
        "dockerfile": false,
        "elixir": false,
        "erlang": false,
        "fsharp": false,
        "git-commit": false,
        "git-rebase": false,
        "github-actions-workflow": false,
        "go": false,
        "graphql": false,
        "groovy": false,
        "handlebars": false,
        "haskell": false,
        "html": false,
        "ini": false,
        "jade": false,
        "java": false,
        "javascript": false,
        "javascriptreact": false,
        "json": false,
        "jsonc": false,
        "julia": false,
        "jupyter": false,
        "latex": false,
        "less": false,
        "lua": false,
        "makefile": false,
        "markdown": true,
        "objective-c": false,
        "perl": false,
        "perl6": false,
        "php": false,
        "plaintext": false,
        "powershell": false,
        "properties": false,
        "pug": false,
        "python": false,
        "r": false,
        "razor": false,
        "restructuredtext": false,
        "ruby": false,
        "rust": false,
        "scala": false,
        "scminput": false,
        "scss": false,
        "shaderlab": false,
        "shellscript": false,
        "sql": false,
        "swift": false,
        "text": true,
        "typescript": false,
        "typescriptreact": false,
        "vb": false,
        "vue": false,
        "xml": false,
        "xsl": false,
        "yaml": false
    }

and it works, but it's quite verbose and not very future proof.

AlexVipond commented 3 hours ago

Bump, and thanks @dsherret for sharing the fix!