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

CSpell is not respecting the words from the global VSCode settings file

Open GYuriy opened this issue 1 year ago • 8 comments

I have all my words that should be considered correct in my global VSCode settings file (AppData\Roaming...):

"cSpell.userWords": [
...
]

After the recent update, none of these words are no longer taken into account by the extension.

GYuriy avatar Nov 25 '24 16:11 GYuriy

Please make sure cSpell.userWords isn't in a .vscode/settings.json file. VS Code will override the global setting.

The user setting: image

Will show Also modified in Workspace. image

If you see Also modified in Workspace, then the value is getting overwritten.

Jason3S avatar Nov 26 '24 21:11 Jason3S

The best expected behavior is to unite/concatenate information from different sources. Using both information from:

  1. file.code-workspace -> cSpell.* (being local configuration);
  2. .vscode/settings.json (being local configuration);
  3. and user profile cSpell.* (being global configuration).

Having local information (file.code-workspace) with priority in case of conflicts.

edit.: I listed the priority order of the settings in case of conflicts

original text (pt-BR)

O melhor comportamento esperado é unir/concatenar as informações das diversas origens. Usando tanto as informações de:

  1. file.code-workspace -> cSpell.* (sendo configuração local);
  2. .vscode/settings.json (sendo configuração local);
  3. e do perfil do usuário cSpell.* (sendo configuração global).

Tendo as informações locais (file.code-workspace) com prioridade em caso de conflitos.

edit.: Enumerei a ordem de prioridade das configurações em caso de conflitos

djedu28 avatar Nov 27 '24 04:11 djedu28

I tried to reinstall the recent version again, and I've noticed two issues:

  1. After the extension host is restarted, I get an error No view is registered with id: cSpellIssuesViewByFile
  2. I have enabled CSpell logs I found this:
2024-11-27 15:34:51.041 [error] Failed to find document for vscode-userdata:/c%3A/Users/y**********h/AppData/Roaming/Code/User/settings.json

The error above probably explains why my custom words are not working, but the extension has no issue locating the config file 3.0.1 (I'm currently using 3.0.1 right now)

p.s. Not sure what c%3A in the file path is...

GYuriy avatar Nov 27 '24 13:11 GYuriy

@GYuriy,

I tried to reinstall the recent version again, and I've noticed two issues:

  1. After the extension host is restarted, I get an error No view is registered with id: cSpellIssuesViewByFile
  • No view is registered with id: cSpellIssuesViewByFile is a known bug in VS Code. And doesn't impact the operation of the spell checker.
  1. I have enabled CSpell logs I found this:
2024-11-27 15:34:51.041 [error] Failed to find document for vscode-userdata:/c%3A/Users/y**********h/AppData/Roaming/Code/User/settings.json

The error above probably explains why my custom words are not working, but the extension has no issue locating the config file 3.0.1 (I'm currently using 3.0.1 right now)

p.s. Not sure what c%3A in the file path is...

This shouldn't be an issue. It shows up when trying to edit the global settings. The spell checker asks VS Code for the settings. I'll address this issue, but it is unrelated to what you are seeing.

c%3A is c:.

Something else is blocking the setting from getting through.

Jason3S avatar Nov 27 '24 16:11 Jason3S

@djedu28,

The best expected behavior is to unite/concatenate information from different sources. Using both information from:

  1. file.code-workspace -> cSpell.* (being local configuration);
  2. .vscode/settings.json (being local configuration);
  3. and user profile cSpell.* (being global configuration).

Having local information (file.code-workspace) with priority in case of conflicts.

edit.: I listed the priority order of the settings in case of conflicts

Extensions have no control over the order in which the settings are merged. See VS Code Settings Precedence

Jason3S avatar Nov 27 '24 16:11 Jason3S

@Jason3S

Extensions have no control over the order in which the settings are merged. See VS Code Settings Precedence

I thank you for the information

djedu28 avatar Nov 28 '24 03:11 djedu28

@Jason3S I'm still trying to figure out what else could change between 3.0.1 and 4+ and caused the issue

GYuriy avatar Dec 05 '24 09:12 GYuriy

@GYuriy,

I'm not sure if it has fixed the issue, but please try the pre-release version.

Jason3S avatar Dec 18 '24 12:12 Jason3S