File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{ if eq .chezmoi.os " linux" -}}
2+ #!/bin/sh
3+ # Install Neovim plugins via Lazy.nvim
4+ # This runs after dotfiles are applied to pre-install all plugins
5+
6+ if ! command -v nvim >/dev/null 2>&1; then
7+ echo " Neovim not installed, skipping plugin installation"
8+ exit 0
9+ fi
10+
11+ echo " Installing Neovim plugins via Lazy..."
12+
13+ # Run Lazy sync in headless mode
14+ # - Lazy! (with bang) suppresses the UI
15+ # - sync installs missing plugins and updates existing ones
16+ nvim --headless " +Lazy! sync" " +qa"
17+
18+ echo " Neovim plugins installed"
19+ {{ end -}}
Original file line number Diff line number Diff line change @@ -50,11 +50,29 @@ if command -v batcat >/dev/null 2>&1 && ! command -v bat >/dev/null 2>&1; then
5050 sudo ln -sf " $(command -v batcat)" /usr/local/bin/bat
5151fi
5252
53+ # Install Neovim via AppImage (Ubuntu repos have old version)
54+ if ! command -v nvim >/dev/null 2>&1; then
55+ curl -fsSL -o /tmp/nvim.appimage https://github.com /neovim/neovim/releases/download/stable/nvim-linux-x86_64.appimage
56+ chmod +x /tmp/nvim.appimage
57+ # Extract AppImage (works in containers without FUSE)
58+ cd /tmp && . /nvim.appimage --appimage-extract >/dev/null 2>&1
59+ sudo mv /tmp/squashfs-root /opt/nvim
60+ sudo ln -sf /opt/nvim/AppRun /usr/local/bin/nvim
61+ rm -f /tmp/nvim.appimage
62+ fi
63+
5364{{ end -}}
5465# Set fish as default shell (applies to all distros)
5566if [ " $(getent passwd " $ (whoami)" | cut -d: -f7)" != " $(which fish)" ]; then
5667 sudo chsh -s " $(which fish)" " $(whoami)"
5768fi
5869
70+ # Install OpenCode
71+ if ! command -v opencode >/dev/null 2>&1 && ! test -x " $HOME/.opencode/bin/opencode" ; then
72+ curl -fsSL https://opencode.ai /install | bash -s -- --no-modify-path
73+ # Symlink to a standard PATH location
74+ sudo ln -sf " $HOME/.opencode/bin/opencode" /usr/local/bin/opencode
75+ fi
76+
5977echo " Portable CLI tools installed"
6078{{ end -}}
Original file line number Diff line number Diff line change @@ -44,6 +44,13 @@ check "fish is default shell" "getent passwd \$(whoami) | grep -q fish"
4444check " fisher installed" " fish -c 'type -q fisher'"
4545check " fish_plugins file exists" " test -f ~/.config/fish/fish_plugins"
4646
47+ check " opencode installed" " command -v opencode"
48+
49+ echo " "
50+ echo " --- Neovim setup ---"
51+ check " lazy.nvim installed" " test -d ~/.local/share/nvim/lazy/lazy.nvim"
52+ check " nvim plugins synced" " test -f ~/.config/nvim/lazy-lock.json"
53+
4754echo " "
4855echo " --- Summary ---"
4956echo " Passed: $PASS "
You can’t perform that action at this time.
0 commit comments