Vim: Difference between revisions
imported>Alttttt39933 m Removed a unnecessary space. |
imported>Dmayle Show how to manage spell fils |
||
| Line 28: | Line 28: | ||
See [https://github.com/rycee/home-manager/blob/master/modules/programs/vim.nix] for the full set of options. | See [https://github.com/rycee/home-manager/blob/master/modules/programs/vim.nix] for the full set of options. | ||
=== Vim Spell Files === | |||
You can configure home-manager to install spelling files into your user directory by packaging individual spell files. Here' an example for neovim and French: | |||
<syntaxHighlight lang="nix"> | |||
let | |||
nvim-spell-fr-utf8-dictionary = builtins.fetchurl { | |||
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl"; | |||
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61"; | |||
}; | |||
nvim-spell-fr-utf8-suggestions = builtins.fetchurl { | |||
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug"; | |||
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58"; | |||
}; | |||
nvim-spell-fr-latin1-dictionary = builtins.fetchurl { | |||
url = "http://ftp.vim.org/vim/runtime/spell/fr.latin1.spl"; | |||
sha256 = "086ccda0891594c93eab143aa83ffbbd25d013c1b82866bbb48bb1cb788cc2ff"; | |||
}; | |||
nvim-spell-fr-latin1-suggestions = builtins.fetchurl { | |||
url = "http://ftp.vim.org/vim/runtime/spell/fr.latin1.sug"; | |||
sha256 = "5cb2c97901b9ca81bf765532099c0329e2223c139baa764058822debd2e0d22a"; | |||
}; | |||
in | |||
{ | |||
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary; | |||
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions; | |||
home.file."${config.xdg.configHome}/nvim/spell/fr.latin1.spl".source = nvim-spell-fr-latin1-dictionary; | |||
home.file."${config.xdg.configHome}/nvim/spell/fr.latin1.sug".source = nvim-spell-fr-latin1-suggestions; | |||
} | |||
</syntaxHighlight> | |||
==== NeoVim with Coc for Python ==== | ==== NeoVim with Coc for Python ==== | ||