vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

Ignore inaccessible custom dictionaries

Open Nabav opened this issue 3 years ago • 4 comments

Code Spell Checker: v1.10.2 VSCode: 1.56.2

To have a common synchronized settings between Linux and Windows, I have the following dictionary definitions:

  "cSpell.dictionaryDefinitions": [
    {
      "name": "general-linux",
      "path": "~/Dokumente/cspell-dic/general.txt"
    },
    {
      "name": "general-win",
      "path": "K:\\Dokumente\\cspell-dic\\general.txt"
    },
  ],
  "cSpell.dictionaries": [
    "general-linux",
    "general-win",
  ],

I have commented the general-win dictionary out while working in Linux, because its path is not valid. It would be perfect if the inaccessible custom user dictionaries are simply ignored.

I think VSCode still does not support OS-specific settings. Correct me if I am wrong. Thanks.

Nabav avatar May 27 '21 11:05 Nabav

@Nabav

The spell checker tries to resolve ~ to be the user's home directory for both Windows and Linux systems. Did you try that?

Jason3S avatar May 27 '21 12:05 Jason3S

The following should work on both Windows and Linux as long as the dictionary is in the location relative to the user's home directory.

  "cSpell.dictionaryDefinitions": [
    {
      "name": "general",
      "path": "~/Dokumente/cspell-dic/general.txt"
    }
  ],
  "cSpell.dictionaries": [
    "general",
  ],

Jason3S avatar May 27 '21 12:05 Jason3S

Very good point. But in my case, it is not mapped exactly in the same path relative to home. In Windows, I am using a mapped network drive. In particular ~/ is not K:\ in my case.

Nabav avatar May 27 '21 14:05 Nabav

Could you use mklink to link the Windows User Home ~/Dokumente/cspell-dic to K:\Dokumente\cspell-dic?

Jason3S avatar May 27 '21 18:05 Jason3S