nvim: Bootstrap spellfile if not existing
Neovim sometimes errors out when enabling spelling without having all the necessary spellfiles available. This ensures on setting up the environment that a spellfile is downloaded.
This commit is contained in:
parent
83f40d6f85
commit
ec5dd24198
1 changed files with 11 additions and 0 deletions
11
nvim/.config/sh/env.d/set-up-spellfile.sh
Normal file
11
nvim/.config/sh/env.d/set-up-spellfile.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
# Set up a non-english spell dictionary if it doesn't exist yet.
|
||||||
|
|
||||||
|
if [ ! -e "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/de.utf-8.spl" ]; then
|
||||||
|
echo "Neovim spell dictionary not yet installed, downloading..."
|
||||||
|
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/"
|
||||||
|
wget -q 'https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl' -O "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/spell/de.utf-8.spl"
|
||||||
|
echo "Done."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue