Skip to content
Closed
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
34 changes: 34 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
RECURSIVE_START
Recognize that all repositories are nix flake based and often use each other as inputs. Sometimes the options and configuration for one repository will be in another as an input which can be found in the flake.nix file of the repo that calls another as an input.

common input names as they link to repos:
- gigdot & dotfiles refer to @gignsky/dotfiles
- wrap, wrapd, wrapper, & tarballer refer to @gignsky/wrap
- nufetch & neofetch refer to @gignsky/nufetch
- gigvim refers to @gignsky/gigvim

Below are rules that must ALWAYS be followed:
1. All progression steps should be displayed as NEW comments with checkbox lists of tasks to be completed, to be checked off via a comment edit while adding a timestamp as well as length of time taken to progress to this point and notes about the task, including links to relevant commits, PRs, or issues, etc...
2. Original prompt for agents should be preserved as a comment at the beginning of a PR or issue as well as in the description of the copilot's initial commit on a new PR
3. Make every effort to make every ai agent call as effective as possible in order to preserve as many premium requests as possible
4. ALWAYS attempt to verify that changes compile, often this is as simple as running `nix flake check` or `nix build` in the repository, if the checks fail, continue iterating until they pass
5. Document as much as possible in markdown files either in the docs/ dir or in logical places alongside files and in files

In all sessions, the order of operations is as follows:
0. Read all of these operations and understand them before continuing
0.a. Create a new comment in the issue or PR that reflects this order of operations with checkboxes and edit the comment marking the checkboxes as you progress
0.a.NOTE: Refer to rule #1
0.b. Analyze all repository's copilot-instructions looking specifically for the RECURSIVE block described in step x+4, find the diff between these versions, determine the most recent / logical state of the block and immediately replace the block in the active repos instructions with it
1. Analyze the active repos' .github/ folder and its contents for repo specific instructions
2. Analyze the other repo's .github/ folder and its contents for general ecosystem updates since last checked
3. Analyze the @gignsky/dotfiles .github/ cortana chatbot markdown file and understand the way in which your are supposed to interact based off of that file
4. Analyze the active repo and ALL its elements and compare and contrast with the active repo's .github/copilot-instructions.md file
5. Based off of information gathered in the previous steps please analyze the expected and actual state of ci/cd in the current repository and make note that the ci/cd pipeline for the current repository exists within the copilot-instructions
6. Update the instructions file to include updated information based off of data gathered in steps 1-5
7. Step 7 (here) should be replaced with 7..x where x equals the total number of steps that cortana determines are necessary to complete the request from the all powerful lord gig minus seven. Steps continue at item x+1 below.
x+1. Testing pipeline should start here, at a minimum a `nix flake check` needs to pass before this item can be marked completed, if this can't be done then detailed error messages should be left in the comments
x+2. Testing pipeline continues, if changes to the repository would have an effect on the flake outputs the changed outputs themselves should be checked here in as many check boxes as is necessary
x+3. After flake testing in items x+1 & x+2 (which can be multiple checkboxes and steps) Repeat steps 0-6 and then continue below on step x+4
x+4. All text between RECURSIVE_START & RECURSIVE_END should be placed at the top of each copilot-instructions.md file in every repository, at this point replace the version from step 0.b with an updated version based on all changes made before this step
RECURSIVE_END

# GigVim - Nix-based Neovim Configuration

GigVim is a Nix Flake-based Neovim configuration using the nvf (NeoVim Flake) framework. It provides a highly customizable and reproducible development environment with language support, plugins, and themes configured declaratively.
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
result
result-*
.direnv
worktrees
.DS_Store
*.log
/tmp/
.cache/
.local/
node_modules/
dist/
build/
1 change: 1 addition & 0 deletions binds/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
imports = [
./git-dev-nvim.nix
./snacks-nvim.nix
];

config.vim.keymaps = [
Expand Down
123 changes: 123 additions & 0 deletions binds/snacks-nvim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
config.vim.keymaps = [
# Snacks.nvim keybindings
{
key = "<leader>gg";
mode = "n";
silent = true;
action = ":lua Snacks.lazygit()";
desc = "Open Lazygit";
}
{
key = "<leader>e";
mode = "n";
silent = true;
action = ":lua Snacks.explorer()";
desc = "Toggle File Explorer";
}
{
key = "<leader>ff";
mode = "n";
silent = true;
action = ":lua Snacks.picker.files()";
desc = "Find Files";
}
{
key = "<leader>fb";
mode = "n";
silent = true;
action = ":lua Snacks.picker.buffers()";
desc = "Find Buffers";
}
{
key = "<leader>fg";
mode = "n";
silent = true;
action = ":lua Snacks.picker.grep()";
desc = "Live Grep";
}
{
key = "<leader>fr";
mode = "n";
silent = true;
action = ":lua Snacks.picker.recent()";
desc = "Recent Files";
}
{
key = "<leader>fs";
mode = "n";
silent = true;
action = ":lua Snacks.picker.symbols()";
desc = "Find Symbols";
}
{
key = "<leader>gf";
mode = "n";
silent = true;
action = ":lua Snacks.picker.git_files()";
desc = "Git Files";
}

# Git utilities
{
key = "<leader>gs";
mode = "n";
silent = true;
action = ":lua Snacks.git.blame_line()";
desc = "Git Blame Line";
}
{
key = "<leader>gS";
mode = "n";
silent = true;
action = ":lua Snacks.git.status()";
desc = "Git Status";
}
{
key = "<leader>gb";
mode = "n";
silent = true;
action = ":lua Snacks.git.branch()";
desc = "Git Branch Info";
}
{
key = "<leader>go";
mode = "n";
silent = true;
action = ":lua Snacks.gitbrowse()";
desc = "Open in Browser";
}

# Buffer management
{
key = "<leader>bd";
mode = "n";
silent = true;
action = ":lua Snacks.bufdelete()";
desc = "Delete Buffer";
}
{
key = "<leader>ba";
mode = "n";
silent = true;
action = ":lua Snacks.bufdelete.all()";
desc = "Delete All Buffers";
}
{
key = "<leader>bo";
mode = "n";
silent = true;
action = ":lua Snacks.bufdelete.other()";
desc = "Delete Other Buffers";
}

# Terminal
{
key = "<leader>t";
mode = "n";
silent = true;
action = ":lua Snacks.terminal()";
desc = "Toggle Terminal";
}
];
}
File renamed without changes.
190 changes: 190 additions & 0 deletions docs/plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# Snacks.nvim Integration for GigVim

## Overview

This directory contains a comprehensive integration of [folke/snacks.nvim](https://github.com/folke/snacks.nvim) into the GigVim nvf-based Neovim configuration. Snacks.nvim is a collection of 26+ small quality-of-life plugins that enhance the Neovim experience.

## Files Structure

```
docs/plugins/
β”œβ”€β”€ snacks-nvim.md # Comprehensive documentation
β”œβ”€β”€ snacks/
β”‚ β”œβ”€β”€ dashboard.md # Dashboard plugin documentation
β”‚ β”œβ”€β”€ picker.md # File/buffer picker documentation
β”‚ β”œβ”€β”€ lazygit.md # Git integration documentation
β”‚ └── indent.md # Indent guides documentation

plugins/optional/
β”œβ”€β”€ snacks-nvim.nix # Default configuration (recommended)
└── TEMPLATE-snacks-nvim-minimal.nix # Conservative setup

binds/
β”œβ”€β”€ snacks-nvim.nix # Keybinding configuration

flake.nix # Updated with snacks-nvim input
```

## Configuration Options

### 1. Default Configuration (`snacks-nvim.nix`)
**Recommended for most users**

- **Enabled snacks**: bigfile, dashboard, explorer, indent, input, notifier, picker, quickfile, dim, animate, bufdelete, debug, health, layout, profiler, terminal
- **Features**: Core QoL improvements, file explorer, picker, notifications, git integration, smooth animations
- **Usage**: Comprehensive setup with essential enhancements

### 2. Minimal Configuration (`TEMPLATE-snacks-nvim-minimal.nix`)
**Conservative setup for cautious users**

- **Enabled snacks**: bigfile, input, notifier, quickfile
- **Features**: Essential improvements only
- **Conflicts**: Minimal - very low risk
- **Usage**: When you want snacks benefits with minimal changes

## Quick Start

### 1. Already Integrated
The snacks.nvim integration is already included in the `full.nix` configuration:

```nix
# In your full.nix (already done)
let
snacksModule = import ./plugins/optional/snacks-nvim.nix { inherit inputs pkgs; };
in
{
imports = [
./minimal.nix
snacksModule
];
}
```

### 2. Build and Test
```bash
# Validate
nix flake check

# Build
nix build

# Test
./result/bin/nvim
```

### 3. Health Check
```vim
:checkhealth snacks
```

## Key Features and Keybindings

### File Operations
| Keybind | Description | Function |
|---------|-------------|-----------|
| `<leader>ff` | Find Files | Smart file finding with fuzzy search |
| `<leader>fr` | Recent Files | Quick access to recently opened files |
| `<leader>fg` | Live Grep | Search text across project files |
| `<leader>fb` | Find Buffers | Navigate between open buffers |
| `<leader>fs` | Find Symbols | Search for symbols in current file |
| `<leader>gf` | Git Files | Find files tracked by Git |

### Git Integration
| Keybind | Description | Function |
|---------|-------------|-----------|
| `<leader>gg` | LazyGit | Integrated LazyGit terminal interface |
| `<leader>gs` | Git Blame Line | Show blame for current line |
| `<leader>gS` | Git Status | Display Git status |
| `<leader>gb` | Git Branch Info | Show current branch information |
| `<leader>go` | Git Browse | Open files in browser (GitHub/GitLab) |

### UI Enhancements
| Feature | Description | Auto-trigger |
|---------|-------------|--------------|
| **Dashboard** | Beautiful startup dashboard | Auto on startup |
| **Big File Handling** | Optimized handling of large files | Automatic |
| **Notifications** | Enhanced notification system | Automatic |
| **Indent Guides** | Visual indentation guides | Automatic |
| **Dim Effects** | Dim inactive code sections | Automatic |
| **Smooth Scrolling** | Smooth scrolling animations | Automatic |

### Development Tools
| Keybind | Description | Function |
|---------|-------------|-----------|
| `<leader>e` | File Explorer | Built-in file tree explorer |
| `<leader>t` | Terminal | Toggle floating terminal |
| `<leader>bd` | Delete Buffer | Smart buffer deletion preserving layout |
| `<leader>ba` | Delete All Buffers | Delete all buffers |
| `<leader>bo` | Delete Other Buffers | Delete all buffers except current |

## Benefits

### Performance Improvements
- **Big File Handling**: Automatic optimization for files >1.5MB
- **Quick File Loading**: Faster startup when opening files directly
- **Smooth Animations**: Enhanced visual experience

### Developer Experience
- **Git Integration**: Seamless Git workflows with LazyGit
- **Advanced Picker**: Fast, fuzzy file and buffer finding
- **Enhanced Explorer**: Better file navigation
- **Smart Notifications**: LSP progress and enhanced messaging

### Visual Enhancements
- **Beautiful Dashboard**: Custom startup screen with GIGVIM branding
- **Indent Guides**: Clear visual code structure
- **Dim Effects**: Focus enhancement by dimming inactive code
- **Modern Interface**: Professional, polished appearance

## Integration with GigVim
- βœ… **Themes**: Works with all GigVim themes (Catppuccin, etc.)
- βœ… **Language Servers**: Enhances LSP experience
- βœ… **nvf core**: Fully compatible with nvf framework
- βœ… **Existing plugins**: Coexists with other GigVim plugins

## Testing Instructions

### Local Testing
1. Build the full configuration: `nix build .#full`
2. Run the built Neovim: `./result/bin/nvim`
3. Verify snacks.nvim is loaded:
- `:lua print(require('snacks'))` (should return "table: 0x...")
- Generate notifications: `:lua vim.notify("Test", vim.log.levels.INFO)`
- Test dashboard: Start nvim without arguments

### Health Check
```vim
:checkhealth snacks
```

### Feature Verification
- **Dashboard**: Start nvim without arguments - should show GIGVIM ASCII art
- **File picker**: Try `<leader>ff`, `<leader>fb`, `<leader>fg`
- **Explorer**: Press `<leader>e` to toggle file explorer
- **Git integration**: Use `<leader>gg` for LazyGit
- **Terminal**: Press `<leader>t` for floating terminal

## Customization

To extend the configuration, you can modify the setup in `plugins/optional/snacks-nvim.nix`:

```nix
setup = ''
require('snacks').setup({
bigfile = { enabled = true },
notifier = { enabled = true, timeout = 3000 },
dashboard = { enabled = true },
-- Add more plugins as needed
})
'';
```

## External Resources

- [Main Repository](https://github.com/folke/snacks.nvim)
- [Official Documentation](https://github.com/folke/snacks.nvim/tree/main/docs)
- [Individual Snack Docs](https://github.com/folke/snacks.nvim/tree/main/docs)

---

*This integration provides a comprehensive, documented approach to using snacks.nvim within the nvf framework, following GigVim's patterns and best practices.*
Loading