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

enabledFileTypes "*": false does not function correctly #3836

Open
kiweezi opened this issue Nov 22, 2024 · 1 comment
Open

enabledFileTypes "*": false does not function correctly #3836

kiweezi opened this issue Nov 22, 2024 · 1 comment
Labels

Comments

@kiweezi
Copy link

kiweezi commented Nov 22, 2024

I would like cspell to only check markdown files. So exclude all other file types / languages. But it seems setting "*": false is not supported.

Here's the configuration I am trying:

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

Ordering them differently in the list, or excluding the "*" item entirely also does not work.

This means all of the following configurations function the same as each other - they enable all file types to be checked:

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

At the very least, I think this is not user friendly behavior, and is difficult to understand. I would love if this was fixed, so that I can use it as described at the start.

Versions

  • Extension: 4.0.21
  • VSCode: 1.95.3
  • OS: Windows 11 10.0.26100
@Jason3S
Copy link
Collaborator

Jason3S commented Nov 23, 2024

@kiweezi,

Please create a repo that shows it not working. It is not clear from your example what is happening.

Some things to know:

  • "*": false will NOT turn off already enabled files. It just means, if a file type has not been explictly enabled, please do not check it by default. By setting "*": false, it will cancel the "*": true in the default settings. See VS Code Settings Precedence on how settings are merged.
  • The cSpell.enableFiletypes also impacts the list of enabled file types. Please set them to "cSpell.enableFiletypes": [].

Note: some dictionaries will explicitly enable its file type. For those, you will need to add something like "al": false. Here is a list: search cspell-dicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants