As it stands, using the code actions shortcut on an unrecognized word gives two options by default: add to global settings.json, or add to .vscode/settings.json of the current project.
However due to limitations inherent to vscode explained in other issues, using the .vscode/settings.json can override, rather than add to, the global settings, hence the existence of both cSpell.words and cSpell.userWords.
I've seen it recommended in other issues that user create a cspell.json file to remedy these problems. I've encountered these myself in using the flagWords setting. I'd like for my editor to globally suggest words like "facade" and "decor" and "naive" be spelt with appropriate diacritic marks, and so I've sensibly put those in the global settings.
However when I then on a project-by-project basis want to e.g. auto-suggest Hepburn romanization for Japanese, these override the global settings. (There could be need for a global userFlaggedWords, analogous to userWords, perhaps?)
That is how I arrived on this problem: once a cspell.json file exists in the .vscode directory, suddenly the code actions lists three options: add to global settings, add to project settings, or add to cspell.json.
This seems strange to me, as cspell.json is obviously the preferred configuiration file due to the aforementioned settings merging problem, but in addition the option to add to the settings.json will be available even if the settings.json does not exist, while the cspell.json does.
I think having the plugin be "opinionated" about what the correct configuration file is would be very appropriate. Other than that, thank you for a wonderful plugin. It helps me write my prose every day!
As it stands, using the code actions shortcut on an unrecognized word gives two options by default: add to global
settings.json, or add to.vscode/settings.jsonof the current project.However due to limitations inherent to vscode explained in other issues, using the
.vscode/settings.jsoncan override, rather than add to, the global settings, hence the existence of bothcSpell.wordsandcSpell.userWords.I've seen it recommended in other issues that user create a
cspell.jsonfile to remedy these problems. I've encountered these myself in using theflagWordssetting. I'd like for my editor to globally suggest words like "facade" and "decor" and "naive" be spelt with appropriate diacritic marks, and so I've sensibly put those in the global settings.However when I then on a project-by-project basis want to e.g. auto-suggest Hepburn romanization for Japanese, these override the global settings. (There could be need for a global
userFlaggedWords, analogous touserWords, perhaps?)That is how I arrived on this problem: once a
cspell.jsonfile exists in the.vscodedirectory, suddenly the code actions lists three options: add to global settings, add to project settings, or add tocspell.json.This seems strange to me, as
cspell.jsonis obviously the preferred configuiration file due to the aforementioned settings merging problem, but in addition the option to add to thesettings.jsonwill be available even if thesettings.jsondoes not exist, while thecspell.jsondoes.I think having the plugin be "opinionated" about what the correct configuration file is would be very appropriate. Other than that, thank you for a wonderful plugin. It helps me write my prose every day!