bartosz-antosik / vscode-spellright

Multilingual, Offline and Lightweight Spellchecker for Visual Studio Code
Other
359 stars 36 forks source link

No language can be selected #256

Closed BreakBB closed 5 years ago

BreakBB commented 5 years ago

I've got a new company laptop and set up spellright on there to write some markdown files, but I can't select any language for the spelling inspection. My systems default language is German and I already tried to install another language (en-US) to check if I can select that one. Office programs are working just fine.

Any idea what might be wrong? Could it be related to some company restrictions which I am not aware of?

Windows 10 Enterprise Version 1803 spellright version: 3.0.28 VS Code version: 1.32.1

kmasuyama commented 5 years ago

I'm having a similar issue on Windows 10 1803, vscode 1.32.3, spellright 3.0.28.

I have English (US) and Japanese languages installed on Windows, but only English appears as options in spellright. I've tried adding Japanese in the spellright settings, but no luck. I also uninstalled English to see what would happen, but spellright did not offer any language (every word, both English and Japanese, showed up as misspelled). Tested in markdown, plaintext, and latex.

bartosz-antosik commented 5 years ago

Sadly, I have had a similar situation in the past, but I have not found any resolution. Please have a look at #194, #106 and #53. It is even noticed in README (see Known Issues).

Sorry about this but it seems outside of the extension (as I have noted in #194).

Could you try whether it works on some other machine?

The only advice which works I had is that it is possible to use Hunspell Backend with dictionaries downloaded like in Windows 7 where there is no built in spelling API.

BreakBB commented 5 years ago

Just as an addition: I had to set the SPELLCHECKER_PREFER_HUNSPELL environment variable to make spellright use the dictionary it found. Without that I was able to select a language but nothing was underlined and the debug stated that spellright finished without any error. Maybe this should be stated in the README?

bartosz-antosik commented 5 years ago

@BreakBB Hi! Thanks for the uopdate! Could you please explain to me what do you mean by "dictionary it found"? When HUNSPELL is used (with the environment variable set) SpellRight should look for the dictionaries as .dic/.aff files on specified location in disk. System dictionaries (without the variable set) are served by the Windows Spell Check API.

Could you please tell me what was the original dictionary mentioned? Have you added the first mentioned en-US dictionary through Windows spelling API or have you tried to just download file?

BreakBB commented 5 years ago

Sorry for being not clear enough. Here is what I did:

Since the normal Windows Spelling API didn't work for me I tried the Hunspell solution you mentioned. So I created the Dictionaries folder at %appdata%\Code\ and added a German.aff and German.dic. After a restart of VS Code I was finally able to select the German language for spellchecking (which means spellright found the Dictionaries folder with the files in it). But even with German selected as language spellright didn't underline any wrong/unknown word. I enabled spellright debug and had a look at the Developer tools but spellright logged "[latex] COMPLETE in 0.29s, 0 errors.". I then remembered an environmental variable was mentioned here. After setting this variable spellright now works as expected (even though not with the Windows Spelling API).

What I wanted to say with my comment before is, that the environmental variable is not mentioned in the README but seems to be required when working with Windows + Hunspell dictionaries.

bartosz-antosik commented 5 years ago

Oh, thank you for explanationsI Now it is very clear. You are right - I will add some note to README file.