diff options
| -rwxr-xr-x | bootstrap-nvim-dict.sh | 34 | ||||
| -rw-r--r-- | nvim/lua/config/options.lua | 4 |
2 files changed, 36 insertions, 2 deletions
diff --git a/bootstrap-nvim-dict.sh b/bootstrap-nvim-dict.sh new file mode 100755 index 0000000..aae8f88 --- /dev/null +++ b/bootstrap-nvim-dict.sh | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | set -eu | ||
| 3 | |||
| 4 | SPELL_DIR="$HOME/.local/share/nvim/site/spell" | ||
| 5 | mkdir -p "$SPELL_DIR" | ||
| 6 | |||
| 7 | cd "$SPELL_DIR" | ||
| 8 | |||
| 9 | download() { | ||
| 10 | local url="$1" | ||
| 11 | local file | ||
| 12 | file=$(basename "$url") | ||
| 13 | |||
| 14 | if [ -f "$file" ]; then | ||
| 15 | echo "Skipping $file (already exists)" | ||
| 16 | return | ||
| 17 | fi | ||
| 18 | |||
| 19 | echo "Downloading $file..." | ||
| 20 | if command -v wget >/dev/null 2>&1; then | ||
| 21 | wget -q --show-progress "$url" | ||
| 22 | elif command -v curl >/dev/null 2>&1; then | ||
| 23 | curl -LO "$url" | ||
| 24 | else | ||
| 25 | echo "ERROR: neither wget nor curl found" | ||
| 26 | exit 1 | ||
| 27 | fi | ||
| 28 | } | ||
| 29 | |||
| 30 | # Deutsche Wörterbücher | ||
| 31 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" | ||
| 32 | download "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | ||
| 33 | |||
| 34 | echo "Deutsche Wörterbücher für Neovim installiert!" | ||
diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index e0d60b7..eefb530 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua | |||
| @@ -18,7 +18,7 @@ opt.spelllang = { "de", "en" } | |||
| 18 | opt.spell = true | 18 | opt.spell = true |
| 19 | 19 | ||
| 20 | -- Die notwendigen Dateien müssen erst noch geladen werden! | 20 | -- Die notwendigen Dateien müssen erst noch geladen werden! |
| 21 | -- TODO: Automatisierenss | 21 | -- TODO: Automatisieren |
| 22 | --[[ | 22 | --[[ |
| 23 | 23 | ||
| 24 | mkdir -p "$HOME/.local/share/nvim/site/spell" | 24 | mkdir -p "$HOME/.local/share/nvim/site/spell" |
| @@ -27,7 +27,7 @@ cd "$HOME/.local/share/nvim/site/spell" | |||
| 27 | wget "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" | 27 | wget "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl" |
| 28 | wget "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" | 28 | wget "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" |
| 29 | 29 | ||
| 30 | ]]-- | 30 | ]] |
| 31 | 31 | ||
| 32 | -- Optionen für ^n-Vervollständigung | 32 | -- Optionen für ^n-Vervollständigung |
| 33 | opt.complete = { ".", "w", "b", "u", "t", "i" } | 33 | opt.complete = { ".", "w", "b", "u", "t", "i" } |
