Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spellfile is set to an arbitary value and does not respect the first word-list declaration in spelllang #47

Open
alesandar opened this issue May 26, 2023 · 1 comment

Comments

@alesandar
Copy link

First of all, thanks a lot for that lovely neovim configuration boilerplate!

I have found that there's a typographical error in your spellfile option.

opt.spellfile = cache_dir .. 'spell/en.uft-8.add'

spell/en.uft-8.add should be spell/en.utf-8.add.

Furthermore, if spelllang was set to something different (e.g. bg) upon startup - the default fallback of spellfile will be changed to bg.utf-8.add. Note that it seems like neovim won't update the value of spellfile dynamically, unless it was initially set.

I have also found that using multiple spelllangs will make force neovim to fallback to the one that has been declared first.

For example:
:se spelllang=en,bg will fallback to en.utf-8.add,
:se spelllang=bg,en will fallback to bg.utf-8.add,

I was able to mimic neovim's default spellfile behaviour (while preserving the cache_dir path) by doing so:
opt.spellfile = cache_dir .. opt.spelllang:get()[1] .. '.utf-8.add'

Let me know if that makes sense to you and I will make a PR.

@glepnir
Copy link
Member

glepnir commented Jun 8, 2023

maybe we can simply removed this. if someone want a spell just add it on his local right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants