Add omarchy-lazyvim

This commit is contained in:
Ryan Hughes
2025-10-08 11:11:54 -04:00
parent 1f30c1a34d
commit b286274a2a
7 changed files with 202 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Arch package build files
*.pkg.tar.zst
*.pkg.tar.xz
*.pkg.tar.gz
*.tar.gz
*.tar.xz
# Build directories
src/
pkg/
starter/
# Makepkg files
*.log
*.sig
+63
View File
@@ -0,0 +1,63 @@
# Maintainer: Ryan Hughes <ryan@omarchy.org>
pkgname=omarchy-lazyvim
pkgver=2025.08.29
pkgrel=1
pkgdesc="Pre-built LazyVim configuration with cached plugins"
arch=('any')
url="https://github.com/LazyVim/LazyVim"
license=('MIT')
depends=('neovim>=0.9.0' 'git')
makedepends=('git' 'nodejs' 'npm' 'tree-sitter-cli')
source=("git+https://github.com/LazyVim/starter.git")
sha256sums=('SKIP')
build() {
cd "$srcdir"
# Create isolated environment for building
export HOME="$srcdir/build-home"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"
mkdir -p "$XDG_CONFIG_HOME" "$XDG_DATA_HOME" "$XDG_STATE_HOME" "$XDG_CACHE_HOME"
# Setup LazyVim starter
cp -r "$srcdir/starter" "$XDG_CONFIG_HOME/nvim"
rm -rf "$XDG_CONFIG_HOME/nvim/.git"
# Copy our custom configs
cp -r "$startdir/lua" "$XDG_CONFIG_HOME/nvim/"
cp -r "$startdir/plugin" "$XDG_CONFIG_HOME/nvim/"
cp "$startdir/lazyvim.json" "$XDG_CONFIG_HOME/nvim/"
# Add custom option to disable relative numbers
echo "vim.opt.relativenumber = false" >>"$XDG_CONFIG_HOME/nvim/lua/config/options.lua"
# Prime LazyVim - download all plugins and TreeSitter parsers in one session
# Run for minimum 60 seconds to ensure everything completes
echo ":: Installing LazyVim plugins and TreeSitter parsers (minimum 60 seconds)..."
nvim --headless \
"+Lazy! sync" \
"+qa!" || true
}
package() {
cd "$srcdir"
# Install everything to /usr/share/omarchy-lazyvim
install -dm755 "$pkgdir/usr/share/$pkgname"
# Copy all the built artifacts
cp -a "$XDG_CONFIG_HOME/nvim" "$pkgdir/usr/share/$pkgname/config"
cp -a "$XDG_DATA_HOME/nvim" "$pkgdir/usr/share/$pkgname/data"
cp -a "$XDG_CACHE_HOME/nvim" "$pkgdir/usr/share/$pkgname/cache"
# Fix permissions to be readable by all users
chmod -R 755 "$pkgdir/usr/share/$pkgname"
find "$pkgdir/usr/share/$pkgname" -type f -exec chmod 644 {} \;
# Install setup script to /usr/bin
install -Dm755 "$startdir/omarchy-lazyvim-setup" "$pkgdir/usr/bin/omarchy-lazyvim-setup"
}
+10
View File
@@ -0,0 +1,10 @@
{
"extras": [
"lazyvim.plugins.extras.editor.neo-tree"
],
"install_version": 8,
"news": {
"NEWS.md": "10960"
},
"version": 8
}
@@ -0,0 +1,8 @@
return {
"folke/snacks.nvim",
opts = {
scroll = {
enabled = false, -- Disable scrolling animations
},
},
}
@@ -0,0 +1,8 @@
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight",
},
},
}
+53
View File
@@ -0,0 +1,53 @@
#!/bin/bash
# Setup script for omarchy-lazyvim
# This can be called from Omarchy setup scripts
set -euo pipefail
PACKAGE_DIR="/usr/share/omarchy-lazyvim"
CONFIG_DIR="${HOME}/.config/nvim"
DATA_DIR="${HOME}/.local/share/nvim"
STATE_DIR="${HOME}/.local/state/nvim"
CACHE_DIR="${HOME}/.cache/nvim"
# Check if package is installed
if [[ ! -d "$PACKAGE_DIR" ]]; then
echo "Error: omarchy-lazyvim package not installed"
exit 1
fi
# Check if nvim config already exists
if [[ -d "$CONFIG_DIR" ]]; then
if gum confirm "Neovim configuration already exists at $CONFIG_DIR. This will overwrite it. Continue?"; then
# Backup existing config
BACKUP_DIR="${CONFIG_DIR}.backup.$(date +%Y%m%d-%H%M%S)"
echo "Backing up existing config to $BACKUP_DIR"
mv "$CONFIG_DIR" "$BACKUP_DIR"
else
echo "Setup cancelled."
exit 0
fi
fi
echo "Setting up LazyVim configuration..."
# Make sure everything is clear
rm -rf $DATA_DIR $CACHE_DIR $STATE_DIR
# Create directories if needed
mkdir -p "$(dirname "$CONFIG_DIR")"
mkdir -p "$(dirname "$DATA_DIR")"
mkdir -p "$(dirname "$CACHE_DIR")"
# Copy files
cp -r "$PACKAGE_DIR/config" "$CONFIG_DIR"
cp -r "$PACKAGE_DIR/data" "$DATA_DIR"
cp -r "$PACKAGE_DIR/cache" "$CACHE_DIR"
for dir in $DATA_DIR/lazy/*/; do
if [ -d "$dir/.git" ]; then
git --git-dir="$dir/.git" --work-tree="$dir" restore .
fi
done
echo "LazyVim setup complete!"
@@ -0,0 +1,45 @@
-- transparent background
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "Pmenu", { bg = "none" })
vim.api.nvim_set_hl(0, "Terminal", { bg = "none" })
vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" })
vim.api.nvim_set_hl(0, "FoldColumn", { bg = "none" })
vim.api.nvim_set_hl(0, "Folded", { bg = "none" })
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
vim.api.nvim_set_hl(0, "WhichKeyFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopeBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopePromptBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "TelescopePromptTitle", { bg = "none" })
-- transparent background for neotree
vim.api.nvim_set_hl(0, "NeoTreeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeNormalNC", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeVertSplit", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeWinSeparator", { bg = "none" })
vim.api.nvim_set_hl(0, "NeoTreeEndOfBuffer", { bg = "none" })
-- transparent background for nvim-tree
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
vim.api.nvim_set_hl(0, "NvimTreeVertSplit", { bg = "none" })
vim.api.nvim_set_hl(0, "NvimTreeEndOfBuffer", { bg = "none" })
-- transparent notify background
vim.api.nvim_set_hl(0, "NotifyINFOBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACEBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGBody", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyINFOTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACETitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGTitle", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyINFOBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyERRORBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyWARNBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyTRACEBorder", { bg = "none" })
vim.api.nvim_set_hl(0, "NotifyDEBUGBorder", { bg = "none" })