Skip to content

Commit 386caef

Browse files
committed
feat(devcontainer-features): add development environment improvements
- Add fd, ripgrep, npm, and pynvim support to Neovim feature - Fix OpenCode configuration ownership - Improve Starship shell script initialization
1 parent faebc22 commit 386caef

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

src/nvim/install.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,23 @@ rm /tmp/nvim-linux.tar.gz
5151

5252
# Make nvim available for everybody
5353
ln -sf /opt/nvim/bin/nvim /usr/local/bin/nvim
54+
55+
# Install fd and ripgrep
56+
echo "Installing fd and ripgrep..."
57+
apt_get fd-find ripgrep
58+
ln -sf "$(which fdfind)" /usr/local/bin/fd
59+
60+
# Install neovim node package if npm is available
61+
if command -v npm > /dev/null 2>&1; then
62+
echo "Installing neovim npm package..."
63+
npm install -g neovim || true
64+
fi
65+
66+
# Install pynvim if python/pip is available
67+
if command -v pip3 > /dev/null 2>&1; then
68+
echo "Installing pynvim..."
69+
pip3 install pynvim 2>/dev/null || pip3 install --break-system-packages pynvim || true
70+
elif command -v pip > /dev/null 2>&1; then
71+
echo "Installing pynvim..."
72+
pip install pynvim 2>/dev/null || pip install --break-system-packages pynvim || true
73+
fi

src/opencode/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ OPENCODE_CONFIG_PATH="$_REMOTE_USER_HOME/.config/opencode"
5454
mkdir -p "$OPENCODE_CONFIG_PATH"
5555
# Copy the configuration
5656
cp -R files/* "$OPENCODE_CONFIG_PATH"
57+
# Fix ownership
58+
chown -R "$_REMOTE_USER:$_REMOTE_USER" "$OPENCODE_CONFIG_PATH"

src/starship/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apt_get_update
1919
apt_get ca-certificates
2020
apt_get curl
2121

22-
# Install Atlas CLI
22+
# Install Starship
2323
curl -sSf https://starship.rs/install.sh | sh -s -- -y --version="${VERSION}"
2424

2525
# Copy the configuration

src/starship/scripts/profile.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

3-
eval "$(starship init bash)"
3+
# Initialize starship for the current shell
4+
case "$0" in
5+
*zsh)
6+
eval "$(starship init zsh)"
7+
;;
8+
*bash|*)
9+
eval "$(starship init bash)"
10+
;;
11+
esac

0 commit comments

Comments
 (0)