add neovim

This commit is contained in:
2025-11-12 09:46:59 -06:00
parent df4e95bfea
commit e10c95152e
9 changed files with 326 additions and 46 deletions

View File

@@ -4,15 +4,18 @@
log() { echo -e "\033[1;34m[INFO]\033[0m $*"; }
exists() { command -v "$1" >/dev/null 2>&1; }
echo -e "\n--- Installing initial packages ---\n"
# --- Defined Paths ---
PANAMA_PATH="$HOME/.local/share/Panama"
echo -e "\n--- Installing relevant packages ---\n"
# --- Install all initial packages ---
PACKAGES_FILE="$HOME/.local/share/Panama/setup/packages/initial-packages"
PACKAGES_FILE="$PANAMA_PATH/setup/packages/initial-packages"
if [[ -f "$PACKAGES_FILE" ]]; then
INITIAL_PACKAGES=$(tr "\n" " " <"$PACKAGES_FILE")
log "Installing $INITIAL_PACKAGES"
sudo dnf install -y "$INITIAL_PACKAGES" > /dev/null 2>&1
log "Packages installed!"
log "Initial packages installed!"
else
log "Package list was not in specified path: $PACKAGES_FILE"
fi
@@ -40,3 +43,23 @@ else
log "Installing oh-my-posh via curl..."
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d "$LOCAL_BIN_PATH" > /dev/null 2>&1
fi
# --- Install Development Packages needed for Neovim ---
DEV_FILE="$PANAMA_PATH/setup/packages/development-packages"
if [[ -f "$DEV_FILE" ]]; then
DEV_PACKAGES=$(tr "\n" " " <"$DEV_FILE")
log "Installing $DEV_PACKAGES"
#sudo dnf install -y $DEV_PACKAGES > /dev/null 2>&1
sudo dnf install -y $DEV_PACKAGES
log "Development packages installed!"
else
log "Package list was not in specified path: $DEV_FILE"
fi
# --- Install Bun ---
if [[ -x "$HOME/.bun/bin/bun" ]]; then
log "Bun already installed at \"$HOME/.bun/bin/bun\""
else
log "Installing Bun via curl..."
curl -fsSL https://bun.sh/install | bash > /dev/null 2>&1
fi

View File

@@ -3,15 +3,33 @@
# Define paths as they have not been defined by new bashrc yet!
PANAMA_PATH="${PANAMA_PATH:-$HOME/.local/share/Panama}"
PANAMA_BASH="${PANAMA_BASH:-$PANAMA_PATH/config/bash}"
PANAMA_DOT="$PANAMA_PATH/config/dot"
PANAMA_OLD="$PANAMA_PATH/config/old"
CONFIG="$HOME/.config"
# Make backup folder if it doesn't exist
mkdir -p "$PANAMA_OLD"
# --- Bashrc ---
# Backup existing .bashrc if it's a regular file
if [ -f "$HOME/.bashrc" ] && [ ! -L "$HOME/.bashrc" ]; then
mv "$HOME/.bashrc" "$PANAMA_BASH/.bashrc.bak"
mv "$HOME/.bashrc" "$PANAMA_OLD/.bashrc"
fi
# Remove old symlink if it exists and points somewhere else
if [ -L "$HOME/.bashrc" ]; then
rm "$HOME/.bashrc"
fi
# Symlink Panama .bashrc file to ~/.bashrc
ln -s "$PANAMA_BASH/.bashrc" "$HOME/.bashrc"
# --- Neovim ---
# Backup existing Neovim config if it's a regular directory
if [ -d "$CONFIG/nvim" ] && [ ! -L "$CONFIG/nvim"]; then
mv "$CONFIG/nvim" "$PANAMA_OLD/nvim"
fi
# Remove old symlink if it exists & points to somewhere else
if [ -L "$CONFIG/nvim" ]; then
rm "$CONFIG/nvim"
fi
# Symlink Panama nvim directory to ~/.config/nvim
ln -s "$PANAMA_DOT/nvim" "$CONFIG/nvim"