-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to setup a custom dictionary? #681
Comments
The spell checker cannot find the dictionary because it does not know what the file is relative to. Please try changing the path to:
The docs need to be updated to make this clearer, but here is the blurb from the changelog:
|
Thanks the extension now loads words from that txt file. But when a word is not recognized and I choose |
It is not very well documented, but it is possible:
Will tell the extension to add files to the |
Unfortunately that didn't work for me. From my "cSpell.dictionaryDefinitions": [
{ "name": "custom", "path": "${workspaceFolder}/.vscode/dictionary.txt" },
],
"cSpell.dictionaries": [ "custom" ],
"cSpell.customFolderDictionaries": ["custom"], But still when I use ctrl . over a misspelled word and choose Any ideas? 🤔 If I have a I'm using the latest versions of vscode and the extension |
I'm guessing you have just a single folder in your workspace. Please try:
|
VS Code is a bit confusing on how it deals we workspaces and folders. If you have a single folder open, that folder is considered the "workspace". If you have multiple folders open, then there is a VS Code Merges the settings in the following order: user, workspace, folder. If the folder has a setting of the same name, it overrides the settings from user and workspace. To be able to write words to different dictionaries, it is necessary to be able to distinguish between the three different configurations. To accomplish this, three different settings are used:
|
"cSpell.dictionaryDefinitions": [
{ "name": "custom", "path": "${workspaceFolder}/.vscode/dictionary.txt" },
],
"cSpell.customWorkspaceDictionaries": [ "custom" ] That works! Thank you! I assume you're talking about those "multi root" workspaces? Yeah I'm just using one root / workspace. The docs could benefit from my above use case... the This is an excellent extension, thanks for making and maintaining it! |
BTW the docs mention this twice, but the
|
Hey @Jason3S I've been using your above recommendation for most of this year: "cSpell.dictionaryDefinitions": [
{ "name": "custom", "path": "${workspaceFolder}/.vscode/dictionary.txt" },
],
"cSpell.customWorkspaceDictionaries": [ "custom" ] But now I can't find any docs to explain how to move from the old to new config. Any pointers? |
Some docs and an example are here: Both of the following will work: "cSpell.dictionaryDefinitions": [
{ "name": "custom", "path": "${workspaceFolder}/.vscode/dictionary.txt" },
],
"cSpell.customDictionaries": { "custom": true } "cSpell.customDictionaries": {
"custom": { "name": "custom", "path": "${workspaceFolder}/.vscode/dictionary.txt", "addWords": true }
}, The change was made to support how VS Code merges User / Workspace / Folder / Language settings. If you define By using an Object instead of an Array, VS Code will merge the settings: Workspace "cSpell.customDictionaries": {
"custom": { "name": "custom", "path": "${workspaceFolder:Root}/.vscode/dictionary.txt", "addWords": true },
"internal": { "path": "${workspaceFolder:Root}/internal-terms.txt" }
}, Folder "cSpell.customDictionaries": {
"web-terms": { "path": "${workspaceFolder:Web}/terms.txt", "addWords": true },
"internal": false
}, Result "cSpell.customDictionaries": {
"custom": { "name": "custom", "path": "${workspaceFolder:Root}/.vscode/dictionary.txt", "addWords": true },
"web-terms": { "path": "${workspaceFolder:Web}/terms.txt", "addWords": true }
}, |
That works, thanks! |
This patch adds a custom dictionary to the folder level so the project name doesn't show up as a spelling error. See [how to set up a custom dictionary][1]. Markdown lint is also configured to support details and summary HTML tags, which are fantastic for Github issue readability. [1]: streetsidesoftware/vscode-spell-checker#681 (comment)
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. |
I'm a little confused by the various config options, and I've read through this.
I want to store my custom words in a text file at
/.vscode/dictionary.txt
.So I added this to my workspace settings (
/.vscode/settings.json
), but it doesn't work:What am I doing wrong?
The text was updated successfully, but these errors were encountered: