bartosz-antosik / vscode-spellright

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

No language available #53

Closed Duffed closed 7 years ago

Duffed commented 7 years ago

I can't choose any language at one of my PC's for some reason. It's working properly on my main one tho. I tried to add other system languages but these also don't show up.

I'm using Windows 10. Latest version of everything.

bartosz-antosik commented 7 years ago

What is displayed in the list of available languages (F1 -> `SpellRight: Select Dictionary (Language)')?

Duffed commented 7 years ago

I can only say "Turn off". No language is listed

bartosz-antosik commented 7 years ago

Is this regular or insiders build of VSCode? Could you maybe post VSCode's complete version information?

Duffed commented 7 years ago

image

bartosz-antosik commented 7 years ago

Could you please find file extension.js (should be in c:\Users{USER}.vscode\extensions\ban.spellright-1.1.22\src) then change:

global.SPELLRIGHT_DEBUG_OUTPUT = false;

to

global.SPELLRIGHT_DEBUG_OUTPUT = true;

restart VSCode and after a while something like this should appear in the DEBUG CONSOLE:

SpellRight bindings: "spellchecker-win32-1.6.6-x64.node". SpellRight activated (win32, x64). Configuration file: "c:\Users\ban.necne\Downloads\tex\test.vscode\spellright.json".

Object language: "en" documentTypes: Array[4] 0: "markdown" 1: "latex" 2: "plaintext" 3: "http" groupDictionaries: true statusBarIndicator: true suggestionsInHints: true addToSystemDictionary: false ignoreRegExps: Array[1] 0: "/tcp/" ignoreFiles: Array[0] notificationClass: "error" SpellRight read 1 words from "c:\Users\ban.necne\Downloads\tex\test.vscode\spellright.dict" dictionary file. SpellRight read 0 words from "C:\Users\ban.necne\AppData\Roaming\Code\User\spellright.dict" dictionary file. RegExp prepare: /tcp/ = /tcp/

Array[23] 0: "en-CA" 1: "en-LR" 2: "en-PH" 3: "en-US" 4: "es-ES" 5: "es-ES_tradnl" 6: "fr-015" 7: "fr-029" 8: "fr-BE" 9: "fr-CA" 10: "fr-CD" 11: "fr-CH" 12: "fr-CI" 13: "fr-CM" 14: "fr-FR" 15: "fr-HT" 16: "fr-LU" 17: "fr-MA" 18: "fr-MC" 19: "fr-ML" 20: "fr-RE" 21: "fr-SN" 22: "pl-PL" Dictionary (language) set to: "en" in "[none]". Spelling of "c:\Users\ban.necne\Downloads\tex\test\demo.md" [markdown] STARTED. Spelling of "c:\Users\ban.necne\Downloads\tex\test\demo.md" [markdown] COMPLETED in 0.443s, 15 errors.

Duffed commented 7 years ago

Hm nothing appears in the Debugging-Console for me when I change global.SPELLRIGHT_DEBUG_OUTPUT to true.

bartosz-antosik commented 7 years ago

But you have restarted VSCode? It won't affect any sooner.

Duffed commented 7 years ago

Yes I tried it multiple times with different files etc. Completely restarted VS each time. I also made sure the task isn't running in the background.

Duffed commented 7 years ago

image

bartosz-antosik commented 7 years ago

Thanks, sorry I have reminded this. This looks mysterious to me. Is this a first time you have installed the extension on this machine or has this state changed recently?

Duffed commented 7 years ago

No it's the first time. I've used Sublimetext before because I wasn't able to install extensions at all due to a proxy. Now I'm able to and use my prefered editor VS Code. I'm still using a proxy btw. but I figured how to configure it. Could this be a problem maybe?

bartosz-antosik commented 7 years ago

I don't thin proxy would have anything to do with this. But! SpellRight uses native module - this is binary module that e.g. connects to the system spelling API on Windows 10. Maybe your system has some sort of limitations here: Antivirus software? Corporate policies?

Maybe a peek to the system event log?

Duffed commented 7 years ago

Hm I just went to a coworker who also uses VS Code. He installed spell right and it works just fine for him. We are in the same network with the same limitations.

I looked in the system event log. There is one Application Error from code.exe and one "Windows Error Reporting". Not really sure what these say. But nothing specific. I could still post the content if you want me to. But I can't trigger any event just by starting VS Code.

Duffed commented 7 years ago

I just noticed when I tried to reinstall your extension that it doesn't really work like it should. The "Restart" button won't appear so I guess the uninstallation does not finish?

bartosz-antosik commented 7 years ago

No, do not post anything if you are not convinced it is related.

I really, rally would like to help but feel confused. No one reported anything even remotely similar.

bartosz-antosik commented 7 years ago

Could you maybe check please whether the files in:

c:\Users{USER}.vscode\extensions\ban.spellright-1.1.22\lib\bin

have installed successfully?

There should be something like this:

spellchecker-darwin-1.6.6-x64.node spellchecker-linux-1.6.6-ia32.node spellchecker-linux-1.6.6-x64.node spellchecker-win32-1.6.6-ia32.node spellchecker-win32-1.6.6-x64.node spellchecker-win32-1.7.4-ia32.node spellchecker-win32-1.7.4-x64.node

Duffed commented 7 years ago

Okay thank you very much so far. Guess I will try to reinstall VS Code and see if this helps.

Oh I did not send the comment. Yes I looked it up - all the files are present.

bartosz-antosik commented 7 years ago

I will close it for now, post to this thread and I will reopen it shall any more facts surface.

bartosz-antosik commented 7 years ago

Just out of curiosity - maybe there are some news regarding this issue? Have you tried to reinstall VSCode? Have it changed anything about extensions not working state?

Duffed commented 7 years ago

I reinstalled VS Code and tried the Insider version but it's still not working :/

sergeevabc commented 6 years ago

No languages are visible here as well.

Win 7 x64, VS Code 1.16.1 portable, SpellRight. Dictionary files dic & aff are placed into VSCode\Data\code\Dictionaries (see directory structure).

bartosz-antosik commented 6 years ago

Hi! Thanks for searching for similar issue and reporting it.

I will have to test i with portable version as to say the truth, I did not.

sergeevabc commented 6 years ago

@bartosz-antosik, did you get a chance to look into this more thoroughly?

bartosz-antosik commented 6 years ago

Yes I had. It has been hopefully resolved. Just some testing on other systems (Linux) is required to be sure that that is the way to go. So in few days it should be done.

BTW. There is a workaround: Just put your dictionaries in:

c:\Users{user-name}\AppData\Roaming\Code\Dictionaries

sergeevabc commented 6 years ago

The very reason to use portable editions is to avoid polluting C:\Users\… with dependencies. In case you need assistance testing the possible fix on Windows, I’m ready to volunteer. And thanks for investing time into promoting tools that reduce the number of mistakes.

bartosz-antosik commented 6 years ago

Yes, of course I understand this. I am just saying, that this would be a workaround.

Version 2.0.12 should work for you. Please give it a test and let me know.

This is however hacking, as VSCode does not give any reasonable way to get User Settings location, (which would work in both portable and installed versions) which is a base for finding the location of the folder you attempted to use.

sergeevabc commented 6 years ago

I see the dictionary’s name in status bar, but words with mistakes are not emphasized. Why?

Settings are as follows

{
    "editor.renderWhitespace": "none",
    "editor.wordWrap": "bounded",
    "workbench.iconTheme": "vs-minimal",
    "spellright.language": "Russian-English Bilingual",
    "spellright.documentTypes": [
        "markdown",
        "latex",
        "plaintext"
    ]
}
bartosz-antosik commented 6 years ago

Are you sure the dictionary is UTF-8? (see notes on this in README.md)

Could you maybe try with some more "classic" dictionary from the link in README.md?

bartosz-antosik commented 6 years ago

Please stand by. Something is wrong. Your dictionary seems ok. I have tested this but it seems something is not ok.

bartosz-antosik commented 6 years ago

Oh, I would like to repeat the question - could you try with e.g. "English - United States" and "Russian" separately?

It seems like hunspell (which is used in case of Windows 7) spelling library does not support merged dictionaries (see #348 and #425).

sergeevabc commented 6 years ago

This dictionary works fine with Sublime Text 3, which also uses Hunspell, if that matters. Nevertheless I downloaded and set English (British) dic & aff, but errors are still not emphasized.

bartosz-antosik commented 6 years ago

Yes, I see it does work, although it's not obvious, They may however use some different (e.g. patched) version of hunspell.

This is strange about British dictionary not working. It works for me:

image

Could you maybe try with "English (American).dic" so we would have some common ground?

sergeevabc commented 6 years ago

I assume it is related to how path hack (6993ae7) is implemented. Put VSCode into subdirectory, which name contains non Latin chars, i.e. C:\Test\Редакторы\VSCode, then words with mistakes are not emphasized. But if I put VSCode into Latin path, i.e. C:\Test\VSCode, then one language dictionaries work fine. It is odd, however, to lock a user like this in the age of Unicode, do you agree?

bartosz-antosik commented 6 years ago

I will have a look at this later, but I strongly suppose it is again Hunspell's issue.

The library I relay on (node-spellchecker) uses Hunspell implementation which is quite old and there is no traction towards updating it and I am really to little to do this on my own, as it requires building/testing on a couple of platforms.

bartosz-antosik commented 6 years ago

If it shows the dictionaries in VSCode's status bar/quick list then it looks like non Latin paths are OK for me but passing them to Hunspell causes problems. Sorry about that but I am afraid the above holds.

Blacque-Jacque commented 5 years ago

Possible cause ? I have this issue on my corporate laptop, but I believe I have isolated it down to the run context for VSCode. If I use runas to launch code with a privileged account (which I use for some PS work) I get no language options. If however I logon with an interactive session, Spell Right works perfectly for the same user account. image

image

A bit more googling leads me to think this is because the profile is not being loaded as part of the run as, not sure how I can do that & achieve elevation too. I'll keep testing, see if I can figure it out.

nicoguaro commented 4 years ago

I have the same problem in Linux Mint 20.