atom / node-spellchecker

SpellChecker Node Module
http://atom.github.io/node-spellchecker
MIT License
300 stars 108 forks source link

isMisspelled() always returns false on Win 7 #79

Open AshDevFr opened 7 years ago

AshDevFr commented 7 years ago

Hi,

I've been using the spellchecker on Macos and Win10 and it works perfectly on both. Unfortunately when I try to use it on Win7 it is not working.

getAvailableDictionaries() return an empty array.

I tried to add this to my configuration and it copy correctly the files but it doesn't change anything.

...
"extraResources": [
     {
        "from": "node_modules/spellchecker/vendor",
        "to": "app.asar.unpacked/node_modules/spellchecker/vendor",
        "filter": "**/*"
      }
    ],
...

The doc says :

Windows 7 and below as well as Linux will rely on Hunspell

But no matter what I try, the array of available dictionaries stays empty and isMisspeled return always false. By default I set the dictionary to en-US.

Does any of you have successfully setup the spellchecker for Windows 7 with Hunspell and if yes, how ?

chrismohr commented 5 years ago

I just ran into the same issue, and got it working with the help of this issue.

We are using electron-packager, and I added the .aff and .dic extensions to unpack, which adds the dictionary files to app.asar.unpacked\node_modules\spellchecker\vendor\hunspell_dictionaries

Here's our config:

    asar: {
      unpack: '**/*.+(dll|node|aff|dic)',
    },
    overwrite: true,

(We were already unpacking .dll and .node for another dependency.)

niftylettuce commented 4 years ago

You can use https://github.com/Wulf/nodehun in the meanwhile. brew install hunspell or sudo apt-get install hunspell. Not sure about Windows support, but it looks like Chocolatey has hunspell package as well.