provide way to enable checking in files in search.exclude – by adding back folders or having a check in all open editors setting
cspell inherits the search.exclude paths – and while that's certainly helpful for running it on the commandline, it is kind of annoying when working in a largish project that has documentation or translation files in the repository.
For regular development work, you don't want to get hits from search from your end-user focused documentation (or rather: don't waste time trying to look for strings there in the first place)
On the other hand the documentation is where you care about spelling the most. But the current extensions doesn't support that.
i.e. I have
"search.exclude": {
"/compile_commands.json": true,
"/dictionaries/": true,
"/helpcontent2/": true,
"/icon-themes/": true,
"/translations/": true
},
in a code-workspace file. In the rare case I want to search in them, I can disable the filter in VSCode's search UI. But if I want to edit a file in e.g. helpcontent2 directory, no spell checking is performed, and the only way to make that work is to edit the workspace file and that is less than ideal.
Suggested solutions:
- a "don't inherit search.exclude" setting – adding a subset of the search.exclude entries to a cspell.ignorePaths item is easy enough to do.
- having a cspell.includePaths setting that takes precedence over the ignore paths – I guess that's least desirable since you would have people thinking it should be an exclusive list while others think it is an addition/override
- have an "always check in open editors" setting – should still follow the EnabledFiletypes filter and workspacefiles-only settings
Thank you.
It currently just takes all the globs from search.exclude:
https://github.com/streetsidesoftware/vscode-spell-checker/blob/b31f92e44c1732bbd8ccad002b423c178428f876/packages/_server/src/config/documentSettings.mts#L412-L422