f3fora / cmp-nuspell

nuspell source for nvim-cmp based on nuspell
10 stars 1 forks source link

Support only en_US #1

Open wimstefan opened 3 years ago

wimstefan commented 3 years ago

Installing successfully as provided in the README I get the following error when starting nvim:

E5113: Error while calling lua chunk: ...e/pack/packer/start/cmp-nuspell/lua/cmp-nuspell/init.lua:9: bad argument #1 to 'load_from_path' (string expected, got nil)

My nvim --version:

NVIM v0.6.0-dev+198-g81f4de08b
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Ws
hadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_
MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/usr/local/src/Tools/neovim.git/build/config -I/usr/local/src/Tools/neovim.git/src -I/usr/local/src/Tools/neovim.git/.dep
s/usr/include -I/usr/include -I/usr/local/src/Tools/neovim.git/build/src/nvim/auto -I/usr/local/src/Tools/neovim.git/build/include
f3fora commented 3 years ago

I suspect you haven't install any hunspell dictionary! What is the output of nuspell -D?

wimstefan commented 3 years ago

Negative. The output of nuspell -D:

Search paths:
/home/swimmer/.local/share/hunspell
/usr/local/share/hunspell
/usr/share/hunspell
/usr/local/share/myspell
/usr/share/myspell
.
Available dictionaries:
de_AT           /usr/share/hunspell/de_AT
de_AT           /usr/share/myspell/de_AT
de_CH           /usr/share/hunspell/de_CH
de_CH           /usr/share/myspell/de_CH
de_DE           /usr/share/hunspell/de_DE
de_DE           /usr/share/myspell/de_DE
de_DE_1901      /usr/share/hunspell/de_DE_1901
de_DE_1901      /usr/share/myspell/de_DE_1901
en_GB           /usr/share/hunspell/en_GB
en_GB           /usr/share/myspell/en_GB
es              /usr/share/hunspell/es
es              /usr/share/myspell/es
es_AR           /usr/share/hunspell/es_AR
es_AR           /usr/share/myspell/es_AR
es_BO           /usr/share/hunspell/es_BO
es_BO           /usr/share/myspell/es_BO
es_CL           /usr/share/hunspell/es_CL
es_CL           /usr/share/myspell/es_CL
es_CO           /usr/share/hunspell/es_CO
es_CO           /usr/share/myspell/es_CO
es_CR           /usr/share/hunspell/es_CR
es_CR           /usr/share/myspell/es_CR
es_CU           /usr/share/hunspell/es_CU
es_CU           /usr/share/myspell/es_CU
es_DO           /usr/share/hunspell/es_DO
es_DO           /usr/share/myspell/es_DO
es_EC           /usr/share/hunspell/es_EC
es_EC           /usr/share/myspell/es_EC
es_ES           /usr/share/hunspell/es_ES
es_ES           /usr/share/myspell/es_ES
es_GT           /usr/share/hunspell/es_GT
es_GT           /usr/share/myspell/es_GT
es_HN           /usr/share/hunspell/es_HN
es_HN           /usr/share/myspell/es_HN
es_MX           /usr/share/hunspell/es_MX
es_MX           /usr/share/myspell/es_MX
es_NI           /usr/share/hunspell/es_NI
es_NI           /usr/share/myspell/es_NI
es_PA           /usr/share/hunspell/es_PA
es_PA           /usr/share/myspell/es_PA
es_PE           /usr/share/hunspell/es_PE
es_PE           /usr/share/myspell/es_PE
es_PH           /usr/share/hunspell/es_PH
es_PH           /usr/share/myspell/es_PH
es_PR           /usr/share/hunspell/es_PR
es_PR           /usr/share/myspell/es_PR
es_PY           /usr/share/hunspell/es_PY
es_PY           /usr/share/myspell/es_PY
es_SV           /usr/share/hunspell/es_SV
es_SV           /usr/share/myspell/es_SV
es_US           /usr/share/hunspell/es_US
es_US           /usr/share/myspell/es_US
es_UY           /usr/share/hunspell/es_UY
es_UY           /usr/share/myspell/es_UY
es_VE           /usr/share/hunspell/es_VE
es_VE           /usr/share/myspell/es_VE
nl              /usr/share/hunspell/nl
nl              /usr/share/myspell/nl
nl_BE           /usr/share/myspell/nl_BE
nl_NL           /usr/share/myspell/nl_NL
f3fora commented 3 years ago

Sorry. I haven't implemented a setup function yet. I have hard-coded local lang = 'en_US'.

wimstefan commented 3 years ago

That explains one thing or the other :) Makes me go back to your cmp-spell plugin though because en_US is not my first language ... Thanks for all your efforts!

f3fora commented 3 years ago

For the moment, it is for sure the best choice.

wimstefan commented 3 years ago

Shall I leave the issue open for future reference until you've implemented more languages?