chezmoi nvim debian手動安裝腳本

This commit is contained in:
Yuan Chiu 2025-05-02 18:01:31 +08:00
parent 3ea9d9ca3e
commit 881fa42086
2 changed files with 13 additions and 3 deletions

View File

@ -30,14 +30,14 @@ casks = [
# 特別備註:
# Debain 12 (bookworm) 沒有eza但是有exa
# Debain 12 (bookworm) 沒有ueberzugpp但是有ueberzug
# Debain 12 (bookworm) neovim版本太舊 0.7lazy無法用
# Debain 12 (bookworm) neovim版本太舊 0.7lazy無法用故在shell腳本特殊處理
[packages.linux.debian]
apt = [
'zsh',
'vim',
'neovim',
'git',
'exa',
'gcc',
]
# Arch Linux -------------------------------------------------------------------

View File

@ -20,8 +20,18 @@ if [ "$EUID" -ne 0 ]; then
else
apt install -y "${to_install_apt[@]}"
fi
{{ end -}}
{{/* 手動安裝 neovim 0.11.1 */ -}}
{{ if and (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.arch "amd64") }}
curl -LO https://github.com/neovim/neovim/releases/download/v0.11.1/nvim-linux-x86_64.appimage
chmod u+x nvim-linux-x86_64.appimage
./nvim-linux-x86_64.appimage --appimage-extract
./squashfs-root/usr/bin/nvim
cp -rf squashfs-root/usr/* /usr/
rm -r nvim-linux-x86_64.appimage squashfs-root
{{ end }}
{{ end -}}
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
{{ if or (eq .chezmoi.osRelease.id "manjaro") (eq .chezmoi.osRelease.id "arch") -}}