Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Core tools
brew "git"
brew "neovim"
brew "curl"
brew "wget"

# Language version managers
brew "mise"

# Development tools
brew "ruby-build" # Needed for mise to install Ruby
brew "openssl@3" # Dependency for ruby-build
brew "libyaml" # Dependency for ruby-build
brew "libffi" # Dependency for ruby-build

# Search and file tools (commonly used with nvim)
brew "ripgrep" # rg - fast grep alternative
brew "fd" # fd - fast find alternative
brew "fzf" # fuzzy finder
brew "bat" # cat with syntax highlighting
brew "tree" # directory tree viewer

# Git tools
brew "lazygit" # Git TUI

# Terminal multiplexer
brew "tmux" # Terminal multiplexer
brew "zellij" # Modern terminal workspace

# LSP and formatters that might be needed
brew "lua-language-server"
brew "stylua" # Lua formatter

# Additional utilities
brew "jq" # JSON processor
brew "yq" # YAML processor
brew "htop" # Process viewer
brew "watch" # Execute command repeatedly
77 changes: 77 additions & 0 deletions DOCKER_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Neovim Docker Setup

## Quick Start

### Build and Run

```bash
# Build the image
docker build -t nvim-dotfiles .

# Run interactively
docker run -it --rm -v $(pwd):/workspace nvim-dotfiles

# Or use docker-compose
docker-compose up -d
docker-compose exec nvim bash
```

### Usage Examples

```bash
# Start Neovim
nvim

# Check health
nvim --headless +checkhealth +qall

# Use Ruby/Node with mise
eval "$(mise activate bash)"
ruby --version
node --version

# Run project commands
bundle install # Ruby projects
npm install # Node projects
```

## Development Workflow

1. **Start the container:**
```bash
docker-compose up -d
docker-compose exec nvim bash
```

2. **Your dotfiles are available** at `/home/developer/.dotfiles`

3. **Work on projects** by mounting them:
```bash
docker run -it --rm -v /path/to/project:/workspace nvim-dotfiles
```

4. **Persistent data** is kept in Docker volumes for nvim and mise

## Customization

- Modify `Brewfile` to add/remove tools
- Update `.tool-versions` to change language versions
- Plugin configuration is automatically loaded from `.config/nvim/`

## Troubleshooting

- **Plugin issues**: Run `nvim --headless "+Lazy! sync" +qa`
- **Language issues**: Run `mise install` to reinstall languages
- **LSP issues**: Check `:LspInfo` and `:Mason` in neovim

## Tools Available

| Tool | Purpose |
|------|---------|
| `nvim` | Neovim editor |
| `rg`, `fd`, `fzf` | Fast searching and file finding |
| `bat`, `tree` | Enhanced file viewing |
| `lazygit` | Git TUI |
| `tmux`, `zellij` | Terminal multiplexing |
| `mise` | Runtime version management |
| `jq`, `yq` | JSON/YAML processing |
70 changes: 70 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Use Ubuntu as base image
FROM ubuntu:22.04

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV HOMEBREW_NO_ANALYTICS=1
ENV HOMEBREW_NO_INSECURE_REDIRECT=1
ENV HOMEBREW_CASK_OPTS="--require-sha"

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
file \
git \
procps \
sudo \
wget \
ca-certificates \
locales \
&& rm -rf /var/lib/apt/lists/*

# Generate locale
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

# Create a non-root user
RUN useradd -m -s /bin/bash developer && \
echo 'developer ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Switch to the developer user
USER developer
WORKDIR /home/developer

# Install Homebrew
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Add Homebrew to PATH
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}"

# Copy Brewfile and install dependencies
COPY --chown=developer:developer Brewfile /home/developer/
RUN brew bundle install --file=/home/developer/Brewfile

# Copy dotfiles
COPY --chown=developer:developer . /home/developer/.dotfiles

# Create symlinks for neovim config
RUN mkdir -p /home/developer/.config && \
ln -sf /home/developer/.dotfiles/.config/nvim /home/developer/.config/nvim

# Copy tool-versions for mise
RUN ln -sf /home/developer/.dotfiles/.tool-versions /home/developer/.tool-versions

# Install languages using mise
RUN /bin/bash -c "eval \"\$(mise activate bash)\" && mise install"

# Initialize neovim and install plugins
RUN nvim --headless "+Lazy! sync" +qa

# Note: Treesitter parsers will be installed on first use
# You can manually install them with: :TSInstall <language>

# Set the working directory to dotfiles
WORKDIR /home/developer/.dotfiles

# Default command
CMD ["/bin/bash"]
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.8'
services:
nvim:
build: .
image: nvim-dotfiles
container_name: neovim-dev
volumes:
- .:/workspace
- nvim_data:/home/developer/.local/share/nvim
- mise_data:/home/developer/.local/share/mise
working_dir: /workspace
stdin_open: true
tty: true
command: /bin/bash

volumes:
nvim_data:
mise_data:
Loading