bartosz-antosik / vscode-spellright

Multilingual, Offline and Lightweight Spellchecker for Visual Studio Code
Other
360 stars 37 forks source link

Incorrect default language #25

Closed borekb closed 7 years ago

borekb commented 7 years ago

I don't have any custom settings and this is in the default settings:

"spellright.language": "en_US"

But when I open any Markdown document, it defaults to a Czech language (which is one of my two languages I write in; where does Spell Right take the languages from anyway?). I think this might be a bug.

borekb commented 7 years ago

I needed to update the language to just "en", then everything works. I'm not sure if this is the expected behavior or not so I'm going to leave this open.

bartosz-antosik commented 7 years ago

This is, well, complicated and I am not sure whether this is expected behavior or not.

By default extension groups dictionaries of the same language and then you have to use "en". In version 1.0.24 it will have groupDictionaries flag exposed and when it would be set to false then LANGUAGE-REGION flag (e.g. "en-UK") should be used. I have described it bit more precisely in README.md for version 1.0.24. Generally (and it is just recent change) if the language flag is not set or set to empty string or nonexistent dictionary, system default locale should be set. This is probably what you observe when the language is set to Czech.

borekb commented 7 years ago

Thanks for the explanation. Where do the dictionaries come from?

bartosz-antosik commented 7 years ago

These are Windows Spell API dictionaries (if you use the extension on Windows 8+) and Hunspell dictionaries (described under Note on Windows 7 Installation section in README.md. So in your case I presume you simply install additional Windows spelling package in here:

27825069-b33ef2f0-60ae-11e7-998b-9dce46d56599

borekb commented 7 years ago

Do these APIs provide the ability to add custom words? Maybe I missed this somewhere but I don't see a way to build up or enhance my custom dictionary with Spell Right.

bartosz-antosik commented 7 years ago

They do, but because they are 1) inconsequent about this 2) missing functionality (e.g. way to remove word) then the only mechanism is to add custom words at the moment are ignoreWords and ignoreRegExps lists.

Both 1) and 2) are better explained in #20266.

borekb commented 7 years ago

Oh that's you, I didn't realize that :) I'm very much looking forward to proper spell checking in VSCode if that ever comes. Thanks for your efforts on this front!