Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Control which settings are passed to cspell #2868

Merged
merged 2 commits into from Oct 14, 2023
Merged

Conversation

Jason3S
Copy link
Collaborator

@Jason3S Jason3S commented Oct 14, 2023

One of the common issues is that the results seen in the extension do not match the results seen by the command line tool.

This is often due to settings in VSCode influencing the extension results.

  • mergeCSpellSettings - allows more control over what settings are passed to cspell. By default, if a cspell config file is found, settings that might impact the result are not sent.

Setting mergeCSpellSettings to true is the same as:

    "cSpell.mergeCSpellSettings": {
        "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,
        "parser": true,
        "patterns": true,
        "pnpFiles": true,
        "reporters": true,
        "suggestWords": true,
        "useGitignore": true,
        "usePnP": true,
        "userWords": true,
        "validateDirectives": true,
        "words": true
    }

Some vscode settings still have an impact, these mostly have to do with user experience, like how often to spell check and how many errors to show.

The key thing is, that if a file is spell checked, the results should be the same as the command line tool.

  • enabled - still allows the user to turn on/off the spell checker in vscode.
  • enabledFiletypes - still allows the user to control which files are checked. Add "enabledFiletypes": ["*"] to cspell.json to override this.

One of the common issues is that the results seen in the extension do not match the results seen by the command line tool.

This is often due to settings in VSCode influencing the extension results.

- `mergeCSpellSettings` - allows more control over what settings are passed to `cspell`. By default, if a cspell config file is found, settings that might impact the result are not sent.
@Jason3S Jason3S marked this pull request as ready for review October 14, 2023 18:55
@Jason3S Jason3S merged commit 68bca74 into main Oct 14, 2023
18 checks passed
@Jason3S Jason3S deleted the dev-cspell-config branch October 14, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant