visual-studio-code - VS 代码拼写检查器
问题描述
我启用了 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
}
],
根据他们的描述:
文件格式:文件中的每一行都被认为是一个字典条目
推荐阅读
- node.js - 如何在 Node Typescript 中的猫鼬控制器上传递类型
- bitbucket - 防止 bitbucket 管道在更新 bitbucket-pipelines.yml 时触发
- python - Tkinter - 将 3 个用户输入变量传递给函数以通过 pandas 查询搜索 csv 文件
- testing - 如何从junit中的模拟超级方法返回
- php - nginx - 仅在满足条件时如何显示目录
- javascript - 如何在窗口模式中显示 qr?
- api - 您可以使用 Coinbase API 请求 S2S OAuth 令牌以在没有用户交互的情况下发出经过身份验证的请求吗?
- linux - 在 Linux 上使用 PowerShell 时,有没有办法在 PS 脚本退出时设置 shell $PWD?
- apache-flink - 在 Flink DataStream 中查找最大值
- python-3.x - Postgres - 无法清除所有行然后重写/替换scrapy管道数据