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

Don't check spelling in user settings file #3542

Open Bullfrog1234 opened 3 months ago

Bullfrog1234 commented 3 months ago

cSpell is checking the user settings.json file located in the AppData folder of my windows computer. This is filled with spelling errors in names of parameters and extension names that are not real words.

This file in my opinion should be out of scope for a spell checker and opt-in via dedicated property if you really want to spell check it.

I have tried to get it to ignore the complete path to the settings file and ignore just the file name. Both did nothing.

Jason3S commented 3 months ago

There are two options:

  1. Use the setting to check only workspace file: image
  2. Upgrade to the preview 4.x version.

The spell checker checks open documents. In the past, this has never been a problem. VSCode changed its behavior a few months ago. They started using the document loading system to read configuration files. So every time VS Code loads a file in the background, it notifies the spell checker.

nidrissi commented 2 months ago

@Jason3S I enabled "Spell Check Only Workspace Files" and I still get spelling errors in the settings file, FYI.

Jason3S commented 2 months ago

@nidrissi,

Thank you. I need a bit more information.

nidrissi commented 2 months ago

@Jason3S I'm using v3, global settings, the file isn't opened. I was mainly commenting to let other people who find this issue know that the first workaround may not necessarily work 🙂. Thanks.

Jason3S commented 2 months ago

@Jason3S I'm using v3, global settings, the file isn't opened. I was mainly commenting to let other people who find this issue know that the first workaround may not necessarily work 🙂. Thanks.

VS Code changed it behavior a few months back. It now silently opens the settings files in a hidden state in the background. This causes v3 to report on any issues found in the settings file. If this annoys you, please add **/settings.json to cSepll.ignorePaths. See https://github.com/streetsidesoftware/vscode-spell-checker/issues/3581#issuecomment-2322829714 .