VS 代码拼写检查器

VS Code Spell Checker

我启用了 VS Code 扩展“代码拼写检查器”,效果很好。但是,我想包含我的自定义词典文件中的单词,这样其中的单词就不会被标记为不正确。我在 settings.json 中尝试了以下操作:

"cSpell.customUserDictionaries": [
    "name": "Custom",
    "description": "These are words from my custom dictionary.",
    "path": "C:\Users\Joe\Documents\Custom.txt",
    "addWords": false
],

但是Custom.txt中的单词仍然被标记为不正确。

如何配置代码拼写检查器,使其能够加载 Custom.txt 中的所有单词并忽略它们?

根据他们的 package.json 配置需要一个 typeof 对象数组,因此以下应该有效:

"cSpell.customUserDictionaries": [
    {
        "name": "Custom",
        "description": "My desc",
        "path": "C:\Users\Joe\Documents\Custom.txt",
        "addWords": false
    }
],

根据他们的描述:

File Format: Each line in the file is considered a dictionary entry