vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

Option to run spell check on entire files/folders

Open millergd opened this issue 4 years ago • 9 comments

There needs to be an option to run spell check on an entire file/folder either through the command line or through the interface. The same way linting can be run or spell check in MS Word. The npm package doesn't integrate with any of the VS Code plugin settings

millergd avatar Aug 27 '19 12:08 millergd

The VS Code spell checker is based upon cspell. If you install it, is should be possible to check all your files with a single command.

Jason3S avatar Aug 30 '19 07:08 Jason3S

The CMD line tool cspell can check entire directories, but it doesn't integrate with any of the VS Code settings in place. My suggestion is to either make the VS Code settings compatible with the CMD line tool cspell, or create an option in VS Code to check entire directories through the application.

I have the issue where I see misspelled words in VS Code, so I add them to the dictionary or ignore them which adds them to a list under the hood in VS Code. But cspell has its own list of custom/ignored words. So my solution is either to continuously sync settings between the two manually, or only use the cspell CMD line tool and remove the VS Code plugin.

millergd avatar Aug 30 '19 13:08 millergd

@millergd If you have a cspell.json file at the root of your project, both the cspell cmd line tool and the extension will use it. Are you seeing a different behavior?

Jason3S avatar Sep 07 '19 04:09 Jason3S

If you have a cspell.json file at the root of your project, both the cspell cmd line tool and the extension will use it.

Awesome! It works just as you have described. If I right-click and add a word to the "folder" dictionary through the app, it creates a settings.json at my root even if I already have a cspell.json. Regardless, the fact that the cspell.json file is updated synchronously is sufficient. Thanks for clarifying this @Jason3S

millergd avatar Sep 09 '19 13:09 millergd

@Jason3S Please, can you tell me how to get this working with several dictionaries?. I have installed Spanish - Code Spell Checker and I wonder if is it possible to run cspell against whole project with same configuration as it runs on every file in VS Code. (I use English and Spanish in my project and VS Code works with both dictionaries but cspell only use English one)

fsanzv avatar Jan 13 '20 15:01 fsanzv

It is a bit annoying, but you need to install the Spanish Dictionary separately. See: cspell-dict-es-es - npm

Jason3S avatar Jan 13 '20 19:01 Jason3S

Working!, thank you very much!!!

fsanzv avatar Jan 14 '20 15:01 fsanzv

Although you seem to have answered @millergd's problem which he mentioned in a subsequent comment, the original suggestion of being able to scan a whole directory from within the VS Code extension would be very valuable, and as far as I understand, still isn't possible.

Are there any plans to add this?

echarrod avatar Apr 08 '20 09:04 echarrod

I'd also like to be able to spell check a folder

nickchomey avatar Dec 13 '21 22:12 nickchomey

So, is this on the list for implementation any time soon?

Nosh-Ware avatar Oct 23 '22 19:10 Nosh-Ware

Hi! Any plans to add this soon?

xansh avatar Feb 27 '23 10:02 xansh

@xansh,

Because there is a command line alternative, there isn't any urgency to do this.

cspell <directory>:

npx cspell .

I'm going to close this issue as not planned, since the original request was answered.

Please open an new issue if the command line tool is insufficient.

Jason3S avatar Feb 27 '23 14:02 Jason3S

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Mar 30 '23 05:03 github-actions[bot]