bartosz-antosik / vscode-spellright

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

Reuse system installed hunspell dictionaries #45

Closed slodki closed 7 years ago

slodki commented 7 years ago

On Linux and Windows 7 Spell Right uses built in Hunspell spell checker library. To use it a pair of Dictionary (.dic) and Affixes (.aff) files have to be downloaded from here (please remember to download RAW files) and placed in Dictionaries subfolder of VSCode's user global configuration directory, located at:

  • Windows: %APPDATA%\Code\Dictionaries\
  • Linux: $HOME/.config/Code/Dictionaries/

Dictionaries subfolder does not exists there by default and has to be created manually.

On Linux it was sufficient for me to symlink system-wide installed dictionaries:

ln -s /usr/share/hunspell ~/.config/Code/Dictionaries

All dictionaries are detected and working.

Please verify if this is correct solution (this dir is readonly for users on Linux) and update SpellRight documentation.

bartosz-antosik commented 7 years ago

Has been added in the version 1.1.14.

gryphon2411 commented 5 years ago

I tried to use the command above, but still no system dictionaries are found by installed Spell Right extension.

I'm using Fedora 29 (Workstation Edition).

In Fedora 29, the directory /usr/share/hunspell is not existed.

@slodki on which Linux distribution did you successfully used system-wide installed directories? what is the structure of your /usr/share/hunspell directory?

gryphon2411 commented 5 years ago

I figured this out.

On Fedora, the system dictionaries located under myspell folder instead of hunspell.

The command mentioned by @slodki worked for me when used it with myspell directory.

I PR-ed (#252) instructions for Fedora users.