vim-dirtytalk icon indicating copy to clipboard operation
vim-dirtytalk copied to clipboard

Prompts `No spell file downloaded for "programming" in utf-8` each startup

Open ok-nick opened this issue 2 years ago • 2 comments

I'm using Neovim and each startup I get the prompt:

:!

No spell file for "programming" in utf-8
Download it?
(Y)es, [N]o:

Even after selecting no, vim-dirtytalk works perfectly. I can confirm the spell file is being downloaded to the correct path.

Here is my config, I'm using lazy.nvim:

return {
	"psliwka/vim-dirtytalk",
	build = function()
		vim.cmd("DirtytalkUpdate")
	end,
	init = function()
		vim.opt.spelllang:append("programming")
	end,
}

ok-nick avatar Dec 28 '22 20:12 ok-nick

I'm seeing the same thing, also with lazy.nvim, with basically the same config as above.

dsully avatar Jan 06 '23 19:01 dsully

I found something similar with largely the same config after converting from packer.nvim to lazy.nvim. My error was the following when running :setlocal spell

Warning: Cannot find word list "programming.utf-8.spl" or "programming.ascii.spl"

I think the issue is that lazy.nvim doesn't add "usual" paths to the neovim's runtimepath. It's kind of explained in the docs under Startup Sequence.

I was able to resolve it by manually add the site location to the runtimepath - this is where vim-dirtytalk installs the lang file (site/spell/programming-utf-8.spl).

Now my config looks like this

return {
  'psliwka/vim-dirtytalk',
  build = ':DirtytalkUpdate',
  config = function()
    vim.opt.spelllang = { 'en', 'programming' }
    vim.opt.rtp:append(vim.fn.stdpath 'data' .. '/site')  -- Line of interest
  end,
}

Hope this helps!

tapayne88 avatar Jan 21 '23 15:01 tapayne88

I finally migrated to lazy.nvim and thus had a chance to test it, but I can't reproduce the issue above. I get a clean install without errors, even after manually purging all site files.

I'm going to assume that whatever the problem was, it's either fixed in the current lazy.nvim and/or neovim itself (I run v0.9.5). Please let me know if I'm wrong though! :pray:

psliwka avatar Feb 09 '24 20:02 psliwka