From 635c6d9b98598e14071d7931c2ec6a25948778fa Mon Sep 17 00:00:00 2001 From: TheOnliestMattastic Date: Thu, 21 May 2026 13:32:53 -0400 Subject: [PATCH] release: HyperFix.nvim v2.0.0 Significant upgrade focused on minimalism and mnemonic speed: - Integrated sidekick.nvim (NES + AI CLI) replacing amp-ai. - Reorganized entire keybinding system into intuitive mnemonic groups. - Implemented 'double-tap' logic for high-frequency actions. - Slimmed down config by removing redundant plugins (DAP, Trouble, Grug-Far). - Standardized project name and ADHD-friendly documentation. - Enhanced Legend of Zelda thematic visual anchors. --- AGENTS.md | 287 -------------------- CHANGELOG.md | 23 +- KEYMAPS.md | 456 -------------------------------- README.md | 252 ++++-------------- init.lua | 2 +- lazy-lock.json | 11 +- lua/config/keymaps.lua | 36 +-- lua/plugins/amp.lua | 89 ------- lua/plugins/conform.lua | 4 +- lua/plugins/dap.lua | 99 ------- lua/plugins/flash.lua | 8 +- lua/plugins/grug-far.lua | 36 --- lua/plugins/mason.lua | 2 +- lua/plugins/mini.lua | 23 +- lua/plugins/render-markdown.lua | 2 +- lua/plugins/sidekick.lua | 60 +++++ lua/plugins/snacks.lua | 354 ++++++++----------------- lua/plugins/todo-comments.lua | 25 +- lua/plugins/treesitter.lua | 2 +- lua/plugins/trouble.lua | 72 ----- lua/plugins/which-key.lua | 63 ++--- lua/snacks-dashboard.lua | 2 +- 22 files changed, 302 insertions(+), 1606 deletions(-) delete mode 100644 AGENTS.md delete mode 100644 KEYMAPS.md delete mode 100644 lua/plugins/amp.lua delete mode 100644 lua/plugins/dap.lua delete mode 100644 lua/plugins/grug-far.lua create mode 100644 lua/plugins/sidekick.lua delete mode 100644 lua/plugins/trouble.lua diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 73ac3b2..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,287 +0,0 @@ -# AGENTS.md - HYPERfix.nvim AI Assistant Guide - -This document defines how AI assistants (like Amp) should help configure, maintain, and extend HYPERfix.nvim—a universally designed Neovim template built with neurodivergent developers in mind. - -## Core Philosophy - -HYPERfix.nvim follows **KISSME** principles: - -- **Keep It Stupidly Simple** — Code is explicit and easy to understand. No unnecessary complexity. -- **Modularize Everything** — Each concern has its own file. Find what you need fast. - -Every code block follows a **WHAT/WHY/HOW/NOTE** pattern—pick 1-2 keywords that add value: - -```lua --- ============================================================================= --- PLUGIN_NAME --- ----------------------------------------------------------------------------- --- WHAT: Brief description of what this does --- WHY: Brief explanation of why it's needed --- HOW: Brief technical explanation of how it works --- NOTE: Any gotchas, alternatives, or reminders --- ----------------------------------------------------------------------------- -``` - -Guidelines: - -- Pick only keywords that add non-redundant information (1-2 typically) -- Keep comments brief (1-2 lines per section) -- Use section headers with dashes for visual breaks -- Avoid explanations that merely repeat the code itself - -## Role & Approach - -### As a Programming Mentor - -AI assistants helping with HYPERfix should: - -- **Guide, don't just execute** — Help users understand _why_ changes matter, not just _how_ to implement them -- **Develop action plans together** — Ask clarifying questions, propose options, and work collaboratively toward solutions -- **Encourage learning** — Point out patterns and best practices so users build confidence in their configuration skills -- **Respect autonomy** — Present choices and let users decide what's right for their workflow - -### Verification & Transparency - -- **Always verify answers** — Research official documentation, plugin repositories, and Neovim changelogs before providing guidance -- **Provide sources** — Include links to official docs, GitHub repositories, or relevant discussions so users can verify information themselves -- **Cite the source** — Be explicit about where information comes from (e.g., "According to Neovim 0.11 docs..." or "From plugin-name's README...") -- **Acknowledge uncertainty** — If unsure, say so and offer to research together -- **Disclose limitations** — Be clear about what you can and cannot verify or test - -## Design Principles - -### Code & Organization - -- **Explicit comments:** Every block explains design decisions -- **Clear organization:** Plugins organized by type, config by concern -- **Single responsibility:** One plugin per file (unless tightly coupled) -- **Error handling:** Graceful degradation when optional dependencies unavailable -- **Modular structure:** Easy to remove, add, or swap components - -## Plugin Installation & Configuration Workflow - -Before installing or modifying any plugin, **ALWAYS** follow this workflow: - -### 1. Review the Official Source - -- Check the plugin's GitHub repository README -- Verify Neovim version compatibility (HYPERfix requires 0.11+) -- Understand dependencies and known conflicts -- Note required setup or initialization steps -- Check if the plugin has a `lazy.nvim` spec or requires custom setup - -### 2. Audit Current Configuration - -- Search `/lua/plugins/` for overlapping features -- Review `/lua/config/keymaps.lua` for keymap conflicts -- Check `/lua/config/options.lua` for related settings -- Identify existing plugins with similar functionality -- Look for configuration dependencies between plugins -- Run `:Lazy check` to verify no broken plugins - -### 3. Explain Your Analysis - -- Document potential conflicts discovered -- List overlapping features with existing plugins -- Identify any keymap collisions -- Explain the impact of proposed changes -- Suggest alternatives if conflicts are problematic -- Note performance implications (startup time, memory, etc.) - -### 4. Propose Default Configuration First - -- Provide exact configuration code with **default settings only** (unless the user specifies otherwise or defaults are unsafe) -- Specify which file(s) to modify and exactly where -- Include ADHD-friendly WHAT/WHY/HOW/NOTE comments -- Show any new or modified keymaps with descriptions -- Explain what the plugin does out of the box - -### 5. Provide Overview and Request Permission - -- Show the exact changes side-by-side (diff format is helpful) -- Explain any keymap changes and their mnemonics -- Document any UI/menu changes -- Summarize the impact (performance, dependencies, conflicts) -- Highlight what will change in the user's workflow -- **Wait for explicit approval before applying changes** - -### 6. Offer Customization Recommendations (After Approval) - -- Once defaults are configured and working, suggest optional customizations -- Explain the benefit of each customization -- Provide code for each option and explain trade-offs -- Work collaboratively to tailor the configuration to the user's workflow -- Respect the user's preferences over prescriptive advice - -### 7. Verify and Document - -- Confirm the user tested the changes in their editor -- Help troubleshoot any issues that arise -- Suggest adding comments to KEYMAPS.md if new bindings were created - -## Keymap Standards - -When creating or modifying keymaps: - -- **Use mnemonic prefix patterns** (`f` = "find", `g` = "git", `c` = "code") -- **Document the mnemonic in comments:** `-- Find operations (f = find)` -- **Avoid Alt+key combinations** (easier to miss modifier keys; Ctrl+key preferred) -- **Always update KEYMAPS.md** after making changes with the new binding and its description -- **Respect Vim conventions** — Keep standard keybindings (`gd`, `gr`, `[q`, `]q`, etc.) -- **Use hybrid approach** — Remap only awkward/uncommon bindings -- **Consistent patterns** — New keymaps should follow existing mnemonic scheme - -### Mnemonic Keymap Families - -Current families in HYPERfix: - -- `f` = **F**ind (files, words, diagnostics) -- `g` = **G**it (branches, commits, hunks) -- `c` = **C**ode (actions, format, lint) -- `d` = **D**ebug (breakpoints, stepping) -- `s` = **S**earch (grep, symbols, history) -- `x` = diagnostic e**x**plorer -- `b` = **B**uffer management -- `h` = **H**elp & information -- `u` = **U**I toggles -- `n` = **N**avigation & language servers -- `q` = **Q**uit/session -- `t` = **T**erminal -- `[x` / `]x` = **Previous/next** (bracketed pairs) - -## Trade-offs Discussion - -When suggesting plugins or configurations, always discuss: - -- **Performance impact** — Will this slow down startup? Add memory overhead? Affect responsiveness? -- **Feature overlap** — Does this duplicate existing functionality? Should something be removed instead? -- **Complexity vs benefit** — Is added complexity worth it? Could a simpler alternative achieve the same goal? -- **Learning curve** — How much must the user learn to use this effectively? -- **Accessibility impact** — Does this help or hinder accessibility? Are there sensory considerations? -- **KISSME alignment** — Does this keep things simple and modular? Does it respect single responsibility? -- **Maintenance burden** — Will this require ongoing updates or tweaks? -- **Compatibility** — Does this conflict with existing plugins or Neovim settings? - -## Neurodivergent-Friendly Assistance - -HYPERfix serves neurodivergent developers first. When assisting users: - -- **Break down complexity** — Offer small, manageable steps instead of large changes -- **Offer choices** — Present multiple approaches and let users pick what feels right -- **Reduce cognitive load** — Use lists, clear structure, and explicit next steps -- **Respect pace** — Some tasks require fresh energy; others are low-lift. Match the effort to the user's capacity -- **Use external structure** — Written plans, todo lists, and visible progress help executive function -- **Acknowledge time blindness** — Give realistic time estimates and be honest about uncertainty - -## Documentation & Communication - -### When Communicating with Users - -- **Plain language** — Avoid jargon unless the user uses it first -- **Explicit next steps** — Always end with clear action items -- **Show your work** — Explain decisions and trade-offs -- **Invite questions** — Encourage users to ask for clarification -- **Celebrate learning** — Point out patterns and concepts they're building mastery around - -### Updating Project Documentation - -- **KEYMAPS.md** — Update whenever keymaps are added, removed, or modified - -## Common Patterns & Best Practices - -### Using lazy.nvim Effectively - -- **Lazy-load by file type** — `ft = { "lua", "json" }` defers plugin loading -- **Lazy-load by command** — `cmd = { "MyCommand" }` delays until first use -- **Lazy-load by key** — `keys = { "f" }` delays until keymap pressed -- **Dependencies** — Use `dependencies = { "plugin/name" }` to manage load order -- **Condition plugins** — Use `cond` to disable plugins based on system/user preference - -### Plugin Organization - -Structure: `lua/plugins/` contains one file per plugin (or plugin group) - -``` -lua/plugins/ -├── completion.lua (blink.cmp + dependencies) -├── ui.lua (visual enhancements) -├── navigation.lua (movement & finding) -├── lsp.lua (language servers) -├── git.lua (git integration) -├── treesitter.lua (syntax & text objects) -└── optional.lua (nice-to-have plugins) -``` - -Keep related plugins together, but separate unrelated features. - -### Configuration Modules - -Utility modules (non-plugin files) go in `lua/` root: - -``` -lua/ -├── config/ -│ ├── options.lua (vim.opt settings) -│ ├── keymaps.lua (all keybindings) -│ ├── autocmds.lua (autocommands) -│ └── lazy.lua (lazy.nvim setup) -├── snacks-dashboard.lua (dashboard config) -└── plugins/ (plugin specs only) -``` - -**Key principle:** Only plugin specs belong in `lua/plugins/`. Configuration modules go in `lua/`. - -## Troubleshooting & Debugging - -### When Things Break - -1. **Check the health check:** `:checkhealth` shows missing dependencies -2. **Review the error:** Read Neovim's error message carefully (often self-explanatory) -3. **Verify dependencies:** Are required system tools installed? (ripgrep, fd, etc.) -4. **Check plugin conflicts:** Use `:Lazy check` to find broken plugins -5. **Review recent changes:** What changed? What broke? Did they happen together? -6. **Isolate the problem:** Disable plugins one by one to find the culprit -7. **Check Neovim version:** Some plugins require specific Neovim versions - -### Common Issues - -**"Plugin won't load"** - -- Check: Is the plugin properly specified? Does it have `dependencies`? -- Verify: Are required system tools installed? -- Try: `:Lazy sync` to update and rebuild plugins - -**"Keymap isn't working"** - -- Check: `:which-key` to see all defined keymaps -- Verify: No plugin is using the same keymap -- Confirm: Keymap isn't conflicting with shell/OS bindings - -**"Completion is slow"** - -- Missing: Do you have `make` and a C compiler? -- Check: `:checkhealth` for missing dependencies -- Fix: Install build tools and run `:Lazy build` - -## Code Style & Standards - -### Lua Code Standards - -- **Consistent indentation:** 2 spaces (configured in `.stylua.toml`) -- **No trailing whitespace** -- **Clear variable names:** `is_ready`, not `ready` for booleans; `plugin_name`, not `pn` -- **Comments before code:** Explain WHAT/WHY before showing HOW -- **Avoid nested tables** when possible (harder to read for ADHD brains) -- **Use explicit requires:** `local M = require("my.module")` at top, then `M.function()` - -## When You're Uncertain - -- **Say so** — "I'm not sure about this. Let me research..." -- **Research together** — Link to official docs and work through it with the user -- **Test in isolation** — Create a minimal reproduction before making changes -- **Offer alternatives** — If unsure which approach is best, present options -- **Learn from mistakes** — If something doesn't work, debug together and document the lesson - ---- - -**Last updated:** December 29, 2025 diff --git a/CHANGELOG.md b/CHANGELOG.md index 34952ce..3c44282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,29 @@ # Changelog -All notable changes to HYPERfix.nvim are documented in this file. +All notable changes to HyperFix.nvim are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [2.0.0] - 2026-05-21 -### 🔄 Changed +### 🚀 Major Changes -- **Keymap swap** — Flash Search now uses ``, Smart Search now uses `/`; more intuitive given Smart Search's broader utility +- **Renamed to HyperFix.nvim** — Updated project identity to a more standardized and polished format +- **Integrated sidekick.nvim** — Replaced legacy `amp-ai` with Folke's `sidekick.nvim`, featuring GitHub Copilot Next Edit Suggestions (NES) and an integrated AI CLI terminal +- **Mnemonic-Centric Keybinding System** — Complete reorganization of leader mappings into intuitive categories (Files, Buffers, Search, Git, Code, AI, UI, Quit) +- **Double-Tap Logic** — Optimized common actions with double-tap mnemonics: `gg` (LazyGit), `cc` (Format Code), `ss` (Smart Search), `qq` (Quit All) +- **Redundant Plugin Cleanup** — Slimmed down the configuration by removing `dap.lua`, `trouble.lua`, and `grug-far.lua` for a more focused, minimalistic experience + +### ✨ Added + +- **Thematic Visuals** — Integrated Legend of Zelda visual anchors. +- **Explorer Redundancy** — Added `\` as a secondary, fast access key for the File Explorer (`mini.files`) + +### 🔧 Fixed + +- **Visual Consistency** — Cleaned up all `which-key` menus and descriptions, removing legacy bracketed mnemonics for a professional UI +- **Behavioral Cleanup** — Removed rapid `jk`/`kj` escape mappings to prevent accidental mode switches +- **Standardized Comments** — Final sweep of ADHD-friendly WHAT/WHY/HOW comments across all configuration files --- diff --git a/KEYMAPS.md b/KEYMAPS.md deleted file mode 100644 index dadb005..0000000 --- a/KEYMAPS.md +++ /dev/null @@ -1,456 +0,0 @@ -# Keymaps Reference - -## Core Navigation - -### Window Navigation - -| Keymap | Mode | Action | -| ------- | ------ | --------------------- | -| `` | Normal | Move to left window | -| `` | Normal | Move to bottom window | -| `` | Normal | Move to top window | -| `` | Normal | Move to right window | - -### Line Navigation (Respects Line Wrapping) - -| Keymap | Mode | Action | -| -------- | -------------- | ---------------------------------- | -| `j` | Normal, Visual | Move down (respects wrapped lines) | -| `k` | Normal, Visual | Move up (respects wrapped lines) | -| `` | Normal, Visual | Move down (respects wrapped lines) | -| `` | Normal, Visual | Move up (respects wrapped lines) | - -### Smart Search Navigation - -| Keymap | Mode | Action | -| ------ | ------------------------ | ---------------------------------------------- | -| `n` | Normal, Visual, Operator | Next search result (intelligent direction) | -| `N` | Normal, Visual, Operator | Previous search result (intelligent direction) | - -## Tab Management - -| Keymap | Mode | Action | -| -------------------- | ------ | -------------------- | -| `` | Normal | New tab | -| `n` | Normal | Next tab | -| `p` | Normal | Previous tab | -| `f` | Normal | First tab | -| `l` | Normal | Last tab | -| `q` | Normal | Close current tab | -| `o` | Normal | Close all other tabs | - -## File Management - -| Keymap | Mode | Action | -| ------------ | ------------------------------ | -------------------------- | -| `` | Normal, Insert, Visual, Select | Save file | -| `fn` | Normal | Create new file | -| `nl` | Normal | Open Lazy (plugin manager) | - -## Text Editing - -### Smart Skip (Insert Mode) - -| Keymap | Mode | Action | -| ------- | ------ | ----------------------------------------------------------- | -| `` | Insert | Skip past closing punctuation `)` `}` `]` `'` `"` or keywords | - -### Insert Mode Control - -| Keymap | Mode | Action | -| -------- | ------ | ----------------------- | -| `` | Insert | Exit insert mode | - -### Normal Mode Utilities - -| Keymap | Mode | Action | -| ------ | ------ | ---------------------------------------- | -| `J` | Normal | CAPS LOCK detection (warns instead of join) | - -### Visual Mode Indentation - -| Keymap | Mode | Action | -| ------ | ------ | --------------------- | -| `<` | Visual | Unindent and reselect | -| `>` | Visual | Indent and reselect | - -## Escape Sequences - -| Keymap | Mode | Action | -| ----------- | ------------------------------- | ---------------------------- | -| `jk` / `kj` | Insert, Command, Visual, Select | Exit to Normal mode | -| `jk` / `kj` | Terminal | Exit to Normal mode | -| `` | Normal | Clear search, refresh screen | - -## Application Management - -### Session Management - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------------ | -| `qs` | Normal | Save session | -| `qr` | Normal | Restore session (picker) | -| `qd` | Normal | Delete session | - -### Quit Operations - -| Keymap | Mode | Action | -| ------------ | ------ | ---------------------------------------- | -| `qq` | Normal | Quit all | -| `qw` | Normal | Save all buffers, save session, and quit | -| `qQ` | Normal | Quit without saving | - -## Comments - -| Keymap | Mode | Action | -| ------ | ------ | ---------------------- | -| `gco` | Normal | Add comment line below | -| `gcO` | Normal | Add comment line above | - -## DAP (Debugging) - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------ | -| `db` | Normal | Toggle breakpoint | -| `dc` | Normal | Continue execution | -| `di` | Normal | Step into | -| `do` | Normal | Step over | -| `dd` | Normal | Toggle DAP UI | - -## Flash (Smart Navigation) - -| Keymap | Mode | Action | -| ----------------- | ------------------------ | ------------------------------- | -| `` | Normal, Visual, Operator | Flash search (jump to location) | - -## Grug-far (Search & Replace) - -| Keymap | Mode | Action | -| ------------ | -------------- | ---------------------------- | -| `sr` | Normal, Visual | Open search & replace dialog | - -## LSP (Language Server Protocol) - -### General LSP - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------------ | -| `nm` | Normal | Open Mason (LSP manager) | - -### LSP Navigation (via Snacks picker) - -| Keymap | Mode | Action | -| ------ | ------ | --------------------- | -| `gd` | Normal | Go to definition | -| `gD` | Normal | Go to declaration | -| `gr` | Normal | Find references | -| `gI` | Normal | Find implementations | -| `gy` | Normal | Go to type definition | -| `gli` | Normal | Incoming calls | -| `glo` | Normal | Outgoing calls | - -### LSP Code Actions & Formatting - -| Keymap | Mode | Action | -| ------------ | ---------------------- | ------------------------------- | -| `cr` | Normal | Rename symbol | -| `ca` | Normal, Visual | Code action | -| `cf` | Normal, Visual, Select | Format buffer | -| `uv` | Normal | Toggle virtual text diagnostics | - -## Treesitter - -### Incremental Selection - -| Keymap | Mode | Action | -| ------ | ------ | ----------------------- | -| `gvv` | Normal | Initialize selection | -| `gvn` | Normal | Expand to next node | -| `gvs` | Normal | Expand to scope | -| `gvp` | Normal | Shrink to previous node | - -## Mini.nvim - -### Mini.files (File Navigator) - -| Keymap | Mode | Action | -| ----------- | ------ | -------------------- | -| `e` | Normal | Toggle file explorer | - -### Mini.surround (Surrounds) - -| Keymap | Mode | Action | -| ------ | -------------- | ------------------------------- | -| `sa` | Normal, Visual | Add surrounding | -| `sd` | Normal | Delete surrounding | -| `sr` | Normal | Replace surrounding | -| `sf` | Normal | Find surrounding (cursor right) | -| `sF` | Normal | Find surrounding (cursor left) | -| `sh` | Normal | Highlight surrounding | - -### Mini.comment (Commenting) - -| Keymap | Mode | Action | -| ------ | -------------- | ---------------------- | -| `gc` | Normal, Visual | Toggle comment (line) | -| `gb` | Normal, Visual | Toggle comment (block) | - -### Mini.bracketed (Navigation) - -| Keymap | Mode | Action | -| ----------- | ------------------------ | ----------------------------- | -| `[b` / `]b` | Normal, Visual, Operator | Previous/next buffer | -| `[B` / `]B` | Normal, Visual, Operator | First/last buffer | -| `[c` / `]c` | Normal, Visual, Operator | Previous/next comment | -| `[C` / `]C` | Normal, Visual, Operator | First/last comment | -| `[d` / `]d` | Normal, Visual, Operator | Previous/next diagnostic | -| `[D` / `]D` | Normal, Visual, Operator | First/last diagnostic | -| `[f` / `]f` | Normal, Visual, Operator | Previous/next file on disk | -| `[F` / `]F` | Normal, Visual, Operator | First/last file on disk | -| `[i` / `]i` | Normal, Visual, Operator | Previous/next indent change | -| `[I` / `]I` | Normal, Visual, Operator | First/last indent change | -| `[j` / `]j` | Normal, Visual, Operator | Previous/next jump in buffer | -| `[J` / `]J` | Normal, Visual, Operator | First/last jump in buffer | -| `[l` / `]l` | Normal, Visual, Operator | Previous/next location | -| `[L` / `]L` | Normal, Visual, Operator | First/last location | -| `[o` / `]o` | Normal, Visual, Operator | Previous/next old file | -| `[O` / `]O` | Normal, Visual, Operator | First/last old file | -| `[q` / `]q` | Normal, Visual, Operator | Previous/next quickfix entry | -| `[Q` / `]Q` | Normal, Visual, Operator | First/last quickfix entry | -| `[t` / `]t` | Normal, Visual, Operator | Previous/next treesitter node | -| `[T` / `]T` | Normal, Visual, Operator | First/last treesitter node | -| `[u` / `]u` | Normal, Visual, Operator | Previous/next undo state | -| `[U` / `]U` | Normal, Visual, Operator | First/last undo state | -| `[w` / `]w` | Normal, Visual, Operator | Previous/next window | -| `[W` / `]W` | Normal, Visual, Operator | First/last window | -| `[y` / `]y` | Normal, Visual, Operator | Previous/next yank | -| `[Y` / `]Y` | Normal, Visual, Operator | First/last yank | - -### Mini.move (Move Text) - -| Keymap | Mode | Action | -| ------- | ---------------------- | -------------------- | -| `` | Normal, Visual, Insert | Move selection left | -| `` | Normal, Visual, Insert | Move selection down | -| `` | Normal, Visual, Insert | Move selection up | -| `` | Normal, Visual, Insert | Move selection right | - -### Mini.operators (Text Operators) - -| Keymap | Mode | Action | -| ------ | -------------- | -------------------- | -| `gx` | Normal, Visual | Exchange text (swap) | - -## Snacks.nvim - -### Smart Picker (Global Search) - -| Keymap | Mode | Action | -| ----------- | ------ | -------------------------------- | -| `/` | Normal | Smart find (auto-detect context) | -| `:` | Normal | Command history | -| `.` | Normal | Scratch buffer selector | - -### Buffer Management - -| Keymap | Mode | Action | -| ------------ | ------ | --------------------- | -| `bb` | Normal | Select buffer | -| `bd` | Normal | Delete buffer | -| `bg` | Normal | Grep in buffers | -| `bS` | Normal | Select scratch buffer | - -### File & Project Navigation - -| Keymap | Mode | Action | -| ------------ | -------------- | --------------------------- | -| `ff` | Normal | Find files | -| `fp` | Normal | Find projects | -| `fr` | Normal | Find recent files | -| `fR` | Normal | Rename file | -| `fw` | Normal, Visual | Find/grep word under cursor | - -### Git Operations - -| Keymap | Mode | Action | -| ------------ | -------------- | -------------------- | -| `gb` | Normal | Git branches | -| `gB` | Normal, Visual | Open in browser | -| `gd` | Normal | Git diff (hunks) | -| `gf` | Normal | Git files | -| `gF` | Normal | Git log file | -| `gg` | Normal | LazyGit | -| `gi` | Normal | GitHub issues (open) | -| `gI` | Normal | GitHub issues (all) | -| `gl` | Normal | Git log | -| `gL` | Normal | Git log line | -| `gp` | Normal | GitHub PRs (open) | -| `gP` | Normal | GitHub PRs (all) | -| `gs` | Normal | Git status | -| `gS` | Normal | Git stash | - -### Help & Configuration - -| Keymap | Mode | Action | -| ------------ | ------ | -------------------- | -| `ha` | Normal | Autocmds | -| `hc` | Normal | Config files | -| `hh` | Normal | Help pages | -| `hk` | Normal | Keymaps | -| `nm` | Normal | Notification history | -| `nN` | Normal | Neovim news | - -### Search & Inspection - -| Keymap | Mode | Action | -| ------------ | ------ | --------------------- | -| `sc` | Normal | Commands | -| `sd` | Normal | Diagnostics | -| `sD` | Normal | Buffer diagnostics | -| `sg` | Normal | Grep | -| `sh` | Normal | Search history | -| `sH` | Normal | Highlights | -| `si` | Normal | Icons | -| `sj` | Normal | Jumps | -| `sl` | Normal | Lines | -| `sL` | Normal | Location list | -| `sm` | Normal | Marks | -| `sx` | Normal | Registers | -| `sR` | Normal | Resume last search | -| `su` | Normal | Undo history | -| `sq` | Normal | Quickfix list | -| `ss` | Normal | LSP symbols | -| `sS` | Normal | LSP workspace symbols | - -### UI & Toggles - -| Keymap | Mode | Action | -| ------------ | ------ | ------------ | -| `uC` | Normal | Colorschemes | -| `uz` | Normal | Zen mode | -| `uZ` | Normal | Zoom | - -### Other Navigation - -| Keymap | Mode | Action | -| ------------ | ---------------- | ------------------ | -| `]]` | Normal, Terminal | Next reference | -| `[[` | Normal, Terminal | Previous reference | -| `qD` | Normal | Dashboard | -| `t` | Normal | Toggle terminal | - -## Todo-Comments - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------------------ | -| `]t` | Normal | Jump to next todo comment | -| `[t` | Normal | Jump to previous todo comment | -| `st` | Normal | Open Todo picker | -| `sT` | Normal | Open Todo/Fix/Fixme picker | -| `xt` | Normal | Show todos in Trouble | -| `xT` | Normal | Show Todo/Fix/Fixme in Trouble | - -## Trouble (Diagnostics & References) - -### Diagnostics & Symbols - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------------- | -| `xd` | Normal | Toggle diagnostics | -| `xD` | Normal | Toggle buffer diagnostics | -| `xs` | Normal | Toggle symbols | - -### Lists - -| Keymap | Mode | Action | -| ------------ | ------ | ------------------------------ | -| `xl` | Normal | Toggle location list | -| `xq` | Normal | Toggle quickfix list | -| `[q` | Normal | Previous quickfix/trouble item | -| `]q` | Normal | Next quickfix/trouble item | - -## Which-key - -| Keymap | Mode | Action | -| ----------- | ------ | ------------------------ | -| `?` | Normal | Show keymaps (which-key) | - -## Blink.cmp (Completion) - -### Completion Menu Navigation - -| Keymap | Mode | Action | -| ----------- | ------ | ------------------------------------ | -| `` | Insert | Show completion menu | -| `` | Insert | Hide completion menu | -| `` | Insert | Accept selected completion | -| `` | Insert | Select next completion | -| `` | Insert | Select previous completion | -| `` | Insert | Scroll completion docs forward | -| `` | Insert | Scroll completion docs backward | -| `` | Insert | Accept snippet | -| `` | Insert | Jump to next snippet placeholder | -| `` | Insert | Jump to previous snippet placeholder | - -### Completion Sources - -| Source | Purpose | Triggers | -| -------- | ---------------------------------------------------------- | ------------------------------- | -| LSP | Language intelligence (definitions, types, methods) | Auto on typing (language-aware) | -| Path | File/directory completion | Auto when typing `/` or `./` | -| Snippets | VSCode-style code templates | Auto on typing snippet prefixes | -| Lazydev | Neovim API completions | Auto in Neovim config files | -| Ripgrep | Project-wide code search (reduce typos, discover patterns) | Auto after 3 characters typed | - -## Conform (Formatting) - -| Keymap | Mode | Action | -| ------------ | ---------------------- | ------------- | -| `cf` | Normal, Visual, Select | Format buffer | - -## Standard Vim Navigation (Built-in) - -| Keymap | Mode | Action | -| ------- | ------ | ------------------------- | -| `K` | Normal | Hover (LSP documentation) | -| `` | Insert | Signature help (LSP) | -| `.` | Normal | Repeat last command | -| `u` | Normal | Undo | -| `` | Normal | Redo | - -## Custom Text Objects (Mini.ai) - -Custom text objects for working with code: - -| Object | Modes | Description | -| ------ | ----- | ---------------------------- | -| `ao` | a/i | Code block (outer/inner) | -| `af` | a/i | Function (outer/inner) | -| `ac` | a/i | Class (outer/inner) | -| `at` | a/i | HTML tag (outer/inner) | -| `ad` | a/i | Digit (outer/inner) | -| `ae` | a/i | Word with case (outer/inner) | - -Usage: Combine with operators like `d` (delete), `c` (change), `y` (yank) - -- `dio` - Delete inner code block -- `caf` - Change outer function -- `yac` - Yank outer class - -## Notes - -- **Leader Key**: `` is mapped to space -- **LocalLeader Key**: `` is used for buffer-local keybindings -- **Mode Abbreviations**: - - `n` = Normal mode - - `i` = Insert mode - - `c` = Command mode - - `x` = Visual mode - - `s` = Select mode - - `o` = Operator-pending mode - - `t` = Terminal mode - -- **Keybinding Strategy**: - - Mnemonic leader keys: `f` = find, `g` = git, `x` = diagnostics - - Bracketed navigation: `[x`/`]x` for previous/next, `[X`/`]X` for first/last - - LSP operations integrated with Snacks picker (gd, gr, gI, gy, etc.) diff --git a/README.md b/README.md index 40571df..63d6f6a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ⚔️ HYPERfix.nvim +# ⚔️ HyperFix.nvim ![welcome](assets/welcome.png) @@ -18,11 +18,11 @@ ## What Is This? -**HYPERfix.nvim** is a Neovim configuration template that prioritizes **accessibility, clarity, and neurodivergent-friendly design** from the ground up. +**HyperFix.nvim** is a Neovim configuration template that prioritizes **accessibility, clarity, and neurodivergent-friendly design** from the ground up. -**Built for learning.** HYPERfix is designed to help new Neovim users (and anyone new to coding) learn by configuring and personalizing their setup. Extensive comments explain WHAT/WHY/HOW for every decision so you understand the system. +**Built for learning.** HyperFix is designed to help new Neovim users (and anyone new to coding) learn by configuring and personalizing their setup. Extensive comments explain WHAT/WHY/HOW for every decision so you understand the system. -**AI-powered by design.** HYPERfix integrates **[AMP](https://ampcode.com/)**, an AI assistant that understands your codebase. Use it to reduce cognitive load, learn faster, and skip tedious, repetitive tasks. AI isn't a distraction—it's a feature, especially for neurodivergent brains that benefit from cognitive support. +**AI-powered by design.** HyperFix integrates **[Sidekick.nvim](https://github.com/folke/sidekick.nvim)**, a modern AI assistant that provides **Next Edit Suggestions (NES)** via GitHub Copilot and an integrated terminal for AI CLI tools like Claude, Gemini, and Grok. AI isn't a distraction—it's a feature that reduces cognitive load and automates routine tasks. ### Core Philosophy: KISSME @@ -31,123 +31,60 @@ ### Neurodivergent-First Design -HYPERfix is built around principles that help **ADHD, autism, dyslexia, and other neurodivergent folks** (and honestly, everyone): +HyperFix is built around principles that help **ADHD, autism, dyslexia, and other neurodivergent folks**: -- **Clear visual hierarchy** — 4px line spacing + WCAG AAA contrast ratios -- **Thoughtful pacing** — Longer timeouts (1250) for key sequences—time to think -- **Mnemonic keymaps** — `f` = find, `g` = git. Patterns you can predict -- **Smart text insertion** — Skip closing punctuation and language keywords (`` for punctuation/keywords, `` to exit insert mode) -- **CAPS LOCK detection** — Overridden `J` warns you if CAPS LOCK is on (a common mistake after exiting insert mode) -- **Explicit documentation** — Every code block explains WHAT/WHY/HOW -- **Graceful degradation** — Missing optional tools won't break your editor +- **Clear visual hierarchy** — 4px line spacing + WCAG AAA contrast ratios. +- **Thoughtful pacing** — Longer timeouts (1250ms) for key sequences—time to think. +- **Mnemonic-Centric Keymaps** — `f` = files, `b` = buffers, `s` = search, `g` = git. Patterns you can predict. +- **Double-Tap Logic** — Most common actions use a double-tap for speed and simplicity (e.g., `gg` for LazyGit, `cc` for Format Code, `ss` for Smart Search). +- **Thematic Context** — A cohesive Legend of Zelda theme provides visual anchors and a sense of adventure. +- **Explicit documentation** — Every code block explains WHAT/WHY/HOW. ## The Kokiri Forest: A Personalized Zelda Theme > _It's dangerous to go alone! Take this._ -> -> 🔥 🧙‍♂️🗡️ 🔥 - -HYPERfix embraces the **Legend of Zelda** universe as its thematic foundation. The Kokiri colorscheme, icons, and naming conventions create a **cohesive, immersive experience** that makes learning to code feel less like a chore and more like an adventure. - -Why Zelda? - -- **Timeless and universally beloved** — A familiar, welcoming reference point -- **Adventure and exploration** — Mirrors the learning journey of mastering your editor -- **Problem-solving and growth** — You start as a novice and level up through configuration -- **Accessibility for everyone** — Zelda games accommodate different play styles and abilities -- **Personalization matters** — Just like Link's journey is unique, so is your Neovim setup +> 🔥 🧙‍♂️ 🔥 +> ⌨️ -Everything is customizable. Change the colorscheme, swap out icons, rebrand the theme—HYPERfix adapts to your vision. - -## Inspired By Giants - -Built on [Kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim), [LazyVim](https://github.com/LazyVim/LazyVim), and [Mini.nvim](https://github.com/echasnovski/mini.nvim) — but with **neurodivergent-first accessibility** baked in. +HyperFix embraces the **Legend of Zelda** universe as its thematic foundation. The Kokiri colorscheme, icons, and naming conventions create a **cohesive, immersive experience** that makes learning to code feel like an adventure. ## What's Inside? -- [echasnovski/mini.nvim](https://dotfyle.com/plugins/echasnovski/mini.nvim) — The "brain" of HYPERfix. Modules for alignment, surround, AI text objects, files, and more -- [folke/snacks.nvim](https://dotfyle.com/plugins/folke/snacks.nvim) — Dashboard, picker, and developer utilities -- [folke/flash.nvim](https://dotfyle.com/plugins/folke/flash.nvim) — Lightning-fast motion with `f`/`t` and Treesitter integration -- [folke/which-key.nvim](https://dotfyle.com/plugins/folke/which-key.nvim) — Discoverable keymaps with helpful descriptions -- [folke/trouble.nvim](https://dotfyle.com/plugins/folke/trouble.nvim) — Beautiful diagnostic and search results viewer -- [MagicDuck/grug-far.nvim](https://dotfyle.com/plugins/MagicDuck/grug-far.nvim) — Find and replace with previews -- [MeanderingProgrammer/render-markdown.nvim](https://dotfyle.com/plugins/MeanderingProgrammer/render-markdown.nvim) — Markdown rendered beautifully -- [nvim-treesitter/nvim-treesitter](https://dotfyle.com/plugins/nvim-treesitter/nvim-treesitter) — Syntax highlighting and text objects -- [saghen/blink.cmp](https://dotfyle.com/plugins/saghen/blink.cmp) — Lightning-fast completion engine -- [neovim/nvim-lspconfig](https://dotfyle.com/plugins/neovim/nvim-lspconfig) — Language server setup -- [mfussenegger/nvim-dap](https://dotfyle.com/plugins/mfussenegger/nvim-dap) — Debugging support -- [stevearc/conform.nvim](https://dotfyle.com/plugins/stevearc/conform.nvim) — Code formatting +- [folke/snacks.nvim](https://github.com/folke/snacks.nvim) — Dashboard, picker, and developer utilities. +- [echasnovski/mini.nvim](https://github.com/echasnovski/mini.nvim) — The "brain" of HyperFix. Modules for alignment, surround, file navigation, and more. +- [folke/sidekick.nvim](https://github.com/folke/sidekick.nvim) — AI sidekick with Next Edit Suggestions and CLI terminal. +- [zbirenbaum/copilot.lua](https://github.com/zbirenbaum/copilot.lua) — GitHub Copilot integration for AI features. +- [folke/flash.nvim](https://github.com/folke/flash.nvim) — Lightning-fast motion and Treesitter integration. +- [folke/which-key.nvim](https://github.com/folke/which-key.nvim) — Discoverable keymaps with clean descriptions. +- [nvim-treesitter/nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) — Advanced syntax highlighting and text objects. +- [saghen/blink.cmp](https://github.com/saghen/blink.cmp) — Lightning-fast completion engine. +- [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) — Language server setup. +- [stevearc/conform.nvim](https://github.com/stevearc/conform.nvim) — Consistent code formatting. ## Install Guide ### Dependencies -You'll need a few things on your system. This should take ~5 minutes to install: - > Requires **Neovim 0.11+**. Always review the code before installing a configuration. -**Core Requirements:** - -- Neovim 0.11+ -- Git -- Ripgrep (for search) -- fd (for file finding) -- **AMP CLI** (for AI-assisted configuration) — optional, but recommended -- Nerd Font: Download Atkinson Mono from https://www.nerdfonts.com — optional - -```bash -# macOS (Homebrew) -brew install neovim git ripgrep fd -brew install atkinson-mono-font # Optional, for optimal readability -npm install -g @ampcode/cli # AMP CLI for AI-assisted config - -# Ubuntu/Debian -sudo apt install neovim git ripgrep fd-find -npm install -g @ampcode/cli # AMP CLI - -# Fedora/RHEL -sudo dnf install neovim git ripgrep fd -npm install -g @ampcode/cli # AMP CLI -# Font: Download Atkinson Mono from https://www.nerdfonts.com (optional) - -# Arch -sudo pacman -S neovim git ripgrep fd -npm install -g @ampcode/cli # AMP CLI -# Font: yay -S atkinson-mono-font (optional) - -# Windows (with Chocolatey) -choco install neovim git ripgrep fd nodejs -npm install -g @ampcode/cli # AMP CLI -# Font: Download Atkinson Mono from https://www.nerdfonts.com (optional) -``` - -**Note on AMP:** The included `amp.nvim` plugin integrates AMP directly into your editor. If you prefer not to use AI assistance, the plugin can be safely deleted from `lua/plugins/`—HYPERfix will work perfectly without it. +- **Neovim 0.11+** +- **Git**, **Ripgrep**, and **fd** +- **GitHub Copilot Subscription** (for NES features) +- **Node.js** (for AI CLIs and LSP support) +- **Nerd Font**: Atkinson Mono is recommended for optimal readability. ### Quick Install -Replace your Neovim config with HYPERfix in one command: +Replace your Neovim config with HyperFix in one command: **Linux/macOS:** ```bash -# Back up your current config (optional but smart) -mv ~/.config/nvim ~/.config/nvim.backup - -# Clone HYPERfix -git clone https://github.com/TheOnliestMattastic/HYPERfix.nvim ~/.config/nvim - -# Launch Neovim and let lazy.nvim install everything -nvim -``` - -**Windows (PowerShell):** - -```powershell # Back up your current config -Move-Item $env:APPDATA\nvim $env:APPDATA\nvim.backup -ErrorAction SilentlyContinue +mv ~/.config/nvim ~/.config/nvim.backup -# Clone HYPERfix -git clone https://github.com/TheOnliestMattastic/HYPERfix.nvim $env:APPDATA\nvim +# Clone HyperFix +git clone https://github.com/TheOnliestMattastic/hyperfix.nvim ~/.config/nvim # Launch Neovim nvim @@ -155,134 +92,39 @@ nvim ### What Happens Next -1. **lazy.nvim** bootstraps itself automatically -2. Plugins install on first launch -3. **Mason** installs LSPs and formatters for your languages -4. You're ready to edit - -### Optional Tools (For Extra Flavor) - -If you want the dashboard to look extra fancy, install one or more of these: - -```bash -# Bonsai tree animation -sudo pacman -S cbonsai # Arch -brew install cbonsai # macOS -apt install cbonsai # Debian/Ubuntu - -# Fortune + cowsay + lolcat -brew install fortune cowsay lolcat # macOS -apt install fortune cowsay lolcat # Debian/Ubuntu -``` +1. **lazy.nvim** bootstraps itself automatically. +2. Plugins install on first launch. +3. **Mason** installs LSPs and formatters for your languages. ## Quick Start -Once installed: - -1. **Open Neovim**: `nvim` -2. **Explore keymaps**: Press `?` (spacebar + question mark) -3. **Open the file explorer**: `e` -4. **Search for files**: `` (try `f` for more find options) -5. **Explore the help documents or config files**: `h` +1. **Explore keymaps**: Press `?` to discover all mappings. +2. **Open the file explorer**: Press `\` or `fe`. +3. **Smart Search**: Press `ss` to find anything. +4. **AI Sidekick**: Press `aa` to toggle the AI terminal. All keymaps are **mnemonic** — if you remember the letter, you remember the command. ## Customization -HYPERfix is meant to be cloned/forked and modified. Here's where to make changes: +HyperFix is designed to be personalized. Make it your own: - **Keymaps**: `lua/config/keymaps.lua` - **Editor settings**: `lua/config/options.lua` -- **Plugins**: `lua/plugins/` (one plugin per file; if you don't like one, just delete it) -- **Colorscheme**: `lua/plugins/mini.lua` (uncomment the `mini.hues` module) - -Every file has comments explaining the WHAT/WHY/HOW. If something feels opinionated, you can change it. - -## AI-Assisted Configuration - -HYPERfix pairs well with **[AMP](https://ampcode.com/)**, an AI assistant that understands your codebase. Use it to learn, debug, and extend your config. - -The included `AGENTS.md` file provides guidelines for AI-assisted customization — ensuring transparency, verification, and that you stay in control of your config. - -_For in-editor AI suggestions, **[Sidekick.nvim](https://github.com/folke/Sidekick.nvim)** integrates well with HYPERfix._ +- **Plugins**: `lua/plugins/` (one file per plugin; delete what you don't need) ## Philosophy & Design ### Why KISSME? -Neurodivergent brains often struggle with **cognitive load** and **context-switching**. A sprawling, interdependent config makes things harder: - -- **Can't find what you need?** Cognitive load spikes -- **Don't understand why a line exists?** You can't modify it safely -- **Too many plugins fighting each other?** Decision paralysis - -HYPERfix solves this by: - -1. Keeping each piece **single-responsibility** (one file = one feature) -2. Making every decision **explicit** (comments explain WHAT/WHY/HOW) -3. Removing **unnecessary complexity** (we say "no" to plugins that don't earn their spot) +Neurodivergent brains often struggle with cognitive load and context-switching. HyperFix solves this by: +1. Keeping each piece **single-responsibility**. +2. Making every decision **explicit** with comments. +3. Removing **unnecessary complexity** to prevent decision paralysis. ### Accessibility First -HYPERfix sets options with accessibility in mind: 4px line spacing (WCAG AAA), 1250ms timeouts (time to think), and centered scrolling. This helps **everyone**, especially those with ADHD, dyslexia, or motor challenges. - -### Mnemonic Keymaps - -Instead of arbitrary letters, we use patterns you can predict: - -- `f` = **F**ind (files, words, diagnostics) -- `g` = **G**it (branches, commits, hunks) -- `c` = **C**ode (actions, format, lint) -- `d` = **D**ebug (breakpoints, stepping) - -Once you remember the pattern, the entire config becomes discoverable. - -## Troubleshooting - -### "Plugins aren't installing" - -Make sure you have an internet connection, then try: - -```bash -nvim +checkhealth -``` - -Look for warnings about missing dependencies (git, ripgrep, etc.). - -### "My colorscheme looks weird" - -The Kokiri colorscheme is designed for dark terminals. If colors look off: - -1. Restart Neovim (known bug: installing/updating plugins via lazy.nvim may interrupt loading the colorscheme; simply restart after installation) -2. Check your terminal's theme (should be a dark background) -3. Try changing the colorscheme in `init.lua`: `vim.cmd.colorscheme("default")` -4. Report it as an issue if it's genuinely broken - -### "A keymap isn't working" - -1. Check if another plugin is using the same keymap: `?` to see all mappings -2. Verify it's not conflicting with your shell or OS keybinds -3. Look at `lua/config/keymaps.lua` to see if it's defined - -## Contributing - -Feedback and contributions are welcome: - -- Found a bug? Open an issue with a minimal reproducible example -- Have an accessibility suggestion? Please share it -- Want to improve documentation? PRs welcome - -## License - -GNU General Public License v3.0 — See [LICENSE](LICENSE) for details. - -## Acknowledgments - -- **Kickstart.nvim** for proving that minimal configs can be mighty -- **LazyVim** for elegant organization and polish -- **Mini.nvim** for modular genius -- **Folke** for pushing Neovim into the future -- The Neovim community for being endlessly helpful and kind +HyperFix sets options with accessibility in mind: 4px line spacing (WCAG AAA), 1250ms timeouts, and centered scrolling. This helps everyone, especially those with ADHD, dyslexia, or motor challenges. --- diff --git a/init.lua b/init.lua index a8cc8fc..fc51d22 100644 --- a/init.lua +++ b/init.lua @@ -8,7 +8,7 @@ █ █ █ █ ██████ ▀██▀ ██▄▄█▀ ██▄▄ ██▄▄██▄ ██▄▄ ██ ▀█▄█▀ █ ▄▄▄▄▄ █ █ ▄▄▄▄▄ █ ██ ██ ██ ██ ██▄▄▄▄ ██ ██ ██ ██ ██ ██ ========================================================================== --]] --- WHAT: HYPERfix.nvim entry point - loads configuration in order +-- WHAT: HyperFix.nvim entry point - loads configuration in order -- WHY: Ensures predictable startup: options, plugins, keymaps -- HOW: Requires Lua modules in dependency order -- NOTE: Colorscheme set before lazy.nvim to avoid initial flash diff --git a/lazy-lock.json b/lazy-lock.json index 00fb466..774918d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,32 +1,27 @@ { "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, - "amp.nvim": { "branch": "main", "commit": "3b9ad5ef0328de1b35cc9bfa723a37db5daf9434" }, "blink-ripgrep.nvim": { "branch": "main", "commit": "5ed7bac817777994cb80abccd052b73eb844166c" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "conform.nvim": { "branch": "master", "commit": "18aeab3d63d350dcf44d64c462cc489a3412af40" }, + "copilot.lua": { "branch": "master", "commit": "407349117f176789df6ec1c23bca72f34e15b4e8" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "grug-far.nvim": { "branch": "main", "commit": "5506c2f59dc9ab2ed6c233585412b24d31d51521" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "cbf8d285e1462dd24acf3507817be2bbcb035919" }, "mini.nvim": { "branch": "main", "commit": "6791615e48801cbf5b2baefadcea77a7760de3f4" }, - "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, - "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, "nvim-lint": { "branch": "master", "commit": "d48f3a76189d03b2239f6df1b2f7e3fa8353743b" }, "nvim-lspconfig": { "branch": "master", "commit": "dfbada1a311c4bf3369f8d5421369c9b6e8b888f" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "render-markdown.nvim": { "branch": "main", "commit": "629eb9533ec989d9d5c6cab8f3ad5372422c24e0" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, + "sidekick.nvim": { "branch": "main", "commit": "208e1c5b8170c01fd1d07df0139322a76479b235" }, + "snacks.nvim": { "branch": "main", "commit": "0770753c88228f7f15449c6a5b242e3f7cd0d71c" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index d38f74a..b841a26 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -23,18 +23,18 @@ map("n", "", "l", { desc = "Window Right" } -- BUFFER MANAGEMENT -- ----------------------------------------------------------------------------- -map("n", "bn", "bnext", { desc = "[N]ext Buffer" }) -map("n", "bp", "bprevious", { desc = "[P]rev Buffer" }) +map("n", "bn", "bnext", { desc = "Next Buffer" }) +map("n", "bp", "bprevious", { desc = "Prev Buffer" }) -- ============================================================================= -- TAB MANAGEMENT -- ----------------------------------------------------------------------------- -map("n", "", "tabnext", { desc = "[TAB] over" }) -map("n", "n", "tabnew", { desc = "[N]ew" }) -map("n", "p", "tabprevious", { desc = "[P]rev" }) -map("n", "q", "tabclose", { desc = "[Q]uit" }) -map("n", "o", "tabonly", { desc = "[O]nly" }) +map("n", "", "tabnext", { desc = "Next Tab" }) +map("n", "n", "tabnew", { desc = "New Tab" }) +map("n", "p", "tabprevious", { desc = "Prev Tab" }) +map("n", "q", "tabclose", { desc = "Close Tab" }) +map("n", "o", "tabonly", { desc = "Only Tab" }) -- stylua: ignore end -- ============================================================================= @@ -209,8 +209,8 @@ map( -- ============================================================================= map({ "i", "x", "n", "s" }, "", "w", { desc = "Save File" }) -map("n", "fn", "enew", { desc = "[N]ew File" }) -map("n", "fs", "w", { desc = "[S]ave File" }) +map("n", "fn", "enew", { desc = "New File" }) +map("n", "fs", "w", { desc = "Save File" }) -- ============================================================================= -- INDENTATION @@ -226,7 +226,7 @@ map("x", ">", ">gv") -- PLUGIN MANAGEMENT -- ----------------------------------------------------------------------------- -map("n", "nl", "Lazy", { desc = "[L]azy" }) +map("n", "ql", "Lazy", { desc = "Lazy" }) -- ============================================================================= -- DIAGNOSTICS TOGGLE @@ -244,7 +244,7 @@ map("n", "uv", function() vim.diagnostic.config({ virtual_text = not vtext }) local status = not vtext and "enabled" or "disabled" Snacks.notify.info("Virtual text diagnostics " .. status) -end, { desc = "Toggle [V]irtual Text Diagnostics" }) +end, { desc = "Toggle Virtual Text Diagnostics" }) -- ============================================================================= -- APPLICATION MANAGEMENT @@ -255,9 +255,9 @@ end, { desc = "Toggle [V]irtual Text Diagnostics" }) -- qs = save session, qr = restore session (picker) -- ----------------------------------------------------------------------------- -map("n", "qq", "qa", { desc = "[Q]uit All" }) -map("n", "qw", "wqa", { desc = "[W]rite & Quit" }) -map("n", "qQ", "q!", { desc = "Force [Q]uit" }) +map("n", "qq", "qa", { desc = "Quit All" }) +map("n", "qw", "wqa", { desc = "Write & Quit" }) +map("n", "qQ", "q!", { desc = "Force Quit" }) map("n", "qW", function() local sessions = require("mini.sessions") @@ -280,7 +280,7 @@ map("n", "qW", function() sessions.write() vim.cmd("wqa") end -end, { desc = "[W]rite to Session & Quit" }) +end, { desc = "Write to Session & Quit" }) map("n", "qs", function() local sessions = require("mini.sessions") @@ -301,20 +301,20 @@ map("n", "qs", function() end end) end -end, { desc = "[S]ave Session" }) +end, { desc = "Save Session" }) map( "n", "qr", function() require("mini.sessions").select() end, - { desc = "[R]estore Session" } + { desc = "Restore Session" } ) map( "n", "qd", function() require("mini.sessions").select("delete") end, - { desc = "[D]elete Session" } + { desc = "Delete Session" } ) map( diff --git a/lua/plugins/amp.lua b/lua/plugins/amp.lua deleted file mode 100644 index 9314fef..0000000 --- a/lua/plugins/amp.lua +++ /dev/null @@ -1,89 +0,0 @@ --- ============================================================================= --- AMP.NVIM: AI-Assisted Code Editing --- ============================================================================= --- WHAT: In-editor AI agent for code understanding, refactoring, and generation --- WHY: Reduces cognitive load by automating routine coding tasks --- (perfect for neurodivergent developers) --- HOW: Integrates with AMP CLI to provide context-aware suggestions and edits --- NOTE: Optional; can be safely deleted from lua/plugins/ if not needed --- REFERENCE: https://github.com/sourcegraph/amp.nvim --- KEYMAPS: Commands defined in config: :AmpSend, :AmpSendBuffer, :AmpPromptSelection --- ============================================================================= - -return { - "sourcegraph/amp.nvim", - lazy = true, - event = { "BufRead" }, - branch = "main", - opts = { auto_start = true, log_level = "info" }, - - -- =========================================================================== - -- CONFIGURATION: Setup amp plugin and create user commands - -- =========================================================================== - -- WHAT: Initialize amp and define custom commands for AI interaction - -- WHY: Must be in `config` block; plugin spec returns before runtime code runs - -- HOW: Call require('amp').setup(opts) and create user commands - -- NOTE: User commands provide convenient shortcuts for sending code to AI - -- --------------------------------------------------------------------------- - config = function(_, opts) - -- apply plugin options safely - local ok, amp = pcall(require, "amp") - if ok and type(amp.setup) == "function" then amp.setup(opts) end - - local amp_message = require("amp.message") - - -- ========================================================================= - -- WHAT: Send a quick message to the agent - -- NOTE: nargs="*" lets the command accept multi-word arguments - -- ------------------------------------------------------------------------- - vim.api.nvim_create_user_command("AmpSend", function(cmdopts) - local message = cmdopts.args or "" - if message == "" then - print("Please provide a message to send") - return - end - amp_message.send_message(message) - end, { - nargs = "*", - desc = "Send a message to Amp", - }) - - -- ========================================================================= - -- WHAT: Send entire buffer contents - -- NOTE: We use nargs="?" because no args are required - -- ------------------------------------------------------------------------- - vim.api.nvim_create_user_command("AmpSendBuffer", function() - local buf = vim.api.nvim_get_current_buf() - local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false) - local content = table.concat(lines, "\n") - amp_message.send_message(content) - end, { - nargs = "?", - desc = "Send current buffer contents to Amp", - }) - - -- ========================================================================= - -- WHAT: Add selected text directly to prompt - -- WHY: Lets you highlight a range and send only that selection - -- HOW: Use a range command (range = true) so opts.line1/line2 are populated - -- NOTE: Use because lua index is 0-based for buf_get_lines start - -- ------------------------------------------------------------------------- - vim.api.nvim_create_user_command("AmpPromptSelection", function(cmdopts) - local start_line = cmdopts.line1 - local end_line = cmdopts.line2 - if not start_line or not end_line then - print( - "Please provide a visual selection or :,AmpPromptSelection" - ) - return - end - local lines = - vim.api.nvim_buf_get_lines(0, start_line - 1, end_line, false) - local text = table.concat(lines, "\n") - amp_message.send_message(text) - end, { - range = true, - desc = "Send selected lines to Amp", - }) - end, -} diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index fbacda4..c0c80da 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -16,13 +16,13 @@ return { cmd = { "ConformInfo" }, keys = { { - "cf", + "cc", function() -- Format with fallback to LSP if conform formatter unavailable require("conform").format({ async = true, lsp_format = "fallback" }) end, mode = "", - desc = "[F]ormat", + desc = "Format Code", }, }, opts = { diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua deleted file mode 100644 index 192c1fc..0000000 --- a/lua/plugins/dap.lua +++ /dev/null @@ -1,99 +0,0 @@ --- ============================================================================= --- NVIM-DAP: Debugging Support --- ----------------------------------------------------------------------------- --- WHAT: Debug Adapter Protocol integration for code debugging --- WHY: Step through code, inspect variables, set breakpoints without leaving editor --- HOW: Lazy-loads on file read; mason-nvim-dap auto-installs debug adapters --- NOTE: Lua debugging requires manual setup; other languages via Mason --- REFERENCE: https://github.com/mfussenegger/nvim-dap, https://github.com/rcarriga/nvim-dap-ui --- KEYMAPS: db (breakpoint), dc (continue), di (step), dd (toggle UI) --- RELATED: lua/plugins/mason.lua --- ----------------------------------------------------------------------------- -return { - { - "mfussenegger/nvim-dap", - lazy = true, - event = "BufRead", - dependencies = { - "rcarriga/nvim-dap-ui", - "nvim-neotest/nvim-nio", - { - "jay-babu/mason-nvim-dap.nvim", - dependencies = "williamboman/mason.nvim", - cmd = { "DapInstall", "DapUninstall" }, - }, - }, - config = function() - local dap = require("dap") - local ui = require("dapui") - - require("mason-nvim-dap").setup({ - ensure_installed = {}, - automatic_installation = true, - handlers = { - -- =================================================================== - -- DEFAULT HANDLER: All other adapters (auto-configured by mason) - -- ------------------------------------------------------------------- - function(config) require("mason-nvim-dap").default_setup(config) end, - }, - }) - - -- ======================================================================= - -- LUA ADAPTER: Manual setup (not provided by mason-nvim-dap by default) - -- ----------------------------------------------------------------------- - -- WHAT: Configures DAP for Lua debugging (currently disabled/stub) - -- WHY: Lua debugging requires local-lua-debugger, which requires setup - -- HOW: Provides a stub adapter that gracefully informs user of setup - -- NOTE: Users can install lua debugger if needed (complex setup required) - -- ----------------------------------------------------------------------- - dap.adapters.lua = { - type = "executable", - command = "lua-dbg", -- Install via: luarocks install lua-dbg - args = {}, - } - - -- ======================================================================= - -- LUA DEBUG CONFIGURATION: Stub (requires lua-dbg installation) - -- ----------------------------------------------------------------------- - -- WHAT: Tells DAP how to launch Lua debugging (currently informational) - -- WHY: Provides placeholder until user installs Lua debugger - -- HOW: Creates a debug config that specifies the adapter and entry point - -- NOTE: Users should install lua-dbg via luarocks for full functionality - -- ----------------------------------------------------------------------- - dap.configurations.lua = { - { - type = "lua", - request = "launch", - name = "Lua (requires lua-dbg)", - program = { - lua = "lua", - args = {}, - }, - stopOnEntry = false, - }, - } - - ui.setup() - - -- Auto open/close UI - dap.listeners.before.attach.dapui_config = function() ui.open() end - dap.listeners.before.launch.dapui_config = function() ui.open() end - dap.listeners.before.event_terminated.dapui_config = function() ui.close() end - dap.listeners.before.event_exited.dapui_config = function() ui.close() end - - -- ======================================================================= - -- Keymaps - -- ----------------------------------------------------------------------- - vim.keymap.set( - "n", - "db", - dap.toggle_breakpoint, - { desc = "[B]reakpoint" } - ) - vim.keymap.set("n", "dc", dap.continue, { desc = "[C]ontinue" }) - vim.keymap.set("n", "di", dap.step_into, { desc = "Step [I]nto" }) - vim.keymap.set("n", "do", dap.step_over, { desc = "Step [O]ver" }) - vim.keymap.set("n", "dd", ui.toggle, { desc = "[D]AP Menu" }) - end, - }, -} diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 2e1d680..5048535 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -33,25 +33,25 @@ return { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, - desc = "Flash Tree[s]itter", + desc = "Flash Treesitter", }, { "r", mode = "o", function() require("flash").remote() end, - desc = "[R]emote Flash", + desc = "Remote Flash", }, { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, - desc = "T[r]eesitter Search", + desc = "Treesitter Search", }, { "", mode = { "c" }, function() require("flash").toggle() end, - desc = "Toggle Flash [S]earch", + desc = "Toggle Flash Search", }, }, } diff --git a/lua/plugins/grug-far.lua b/lua/plugins/grug-far.lua deleted file mode 100644 index 1362145..0000000 --- a/lua/plugins/grug-far.lua +++ /dev/null @@ -1,36 +0,0 @@ --- ============================================================================= --- GRUG-FAR.NVIM: Advanced Find and Replace --- ----------------------------------------------------------------------------- --- WHAT: Full-featured search & replace with live preview and safety checks --- WHY: Built-in substitute command is error-prone; grug-far shows changes before commit --- HOW: Opens dedicated buffer for search patterns; preview updates in real-time --- NOTE: File-type auto-filtering helps avoid accidentally changing wrong file types --- REFERENCE: https://github.com/MagicDuck/grug-far.nvim --- KEYMAPS: sr to open dialog (or GrugFar/GrugFarWithin commands) --- ----------------------------------------------------------------------------- -return { - { - "MagicDuck/grug-far.nvim", - lazy = true, - event = { "BufRead" }, - opts = { headerMaxWidth = 80 }, - cmd = { "GrugFar", "GrugFarWithin" }, - keys = { - { - "sr", - function() - local grug = require("grug-far") - local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") - grug.open({ - transient = true, - prefills = { - filesFilter = ext and ext ~= "" and "*." .. ext or nil, - }, - }) - end, - mode = { "n", "x" }, - desc = "Search and [R]eplace", - }, - }, - }, -} diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 0d37694..ecc84a1 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -12,7 +12,7 @@ return { "mason-org/mason.nvim", lazy = true, - keys = { { "nm", "Mason", desc = "[M]ason" } }, + keys = { { "qm", "Mason", desc = "Mason" } }, opts = { ui = { icons = { diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 3a26e8d..25ebcf8 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -68,11 +68,13 @@ return { windows = { preview = true }, }) -- keymap - vim.keymap.set("n", "e", function() + local mini_files_toggle = function() if not require("mini.files").close() then require("mini.files").open() end - end, { desc = "File [E]xplorer" }) + end + vim.keymap.set("n", "fe", mini_files_toggle, { desc = "Explorer" }) + vim.keymap.set("n", "\\", mini_files_toggle, { desc = "Explorer" }) vim.api.nvim_create_autocmd("User", { pattern = "MiniFilesActionRename", @@ -81,23 +83,6 @@ return { end, }) - -- ======================================================================= - -- mini.keymap - -- ----------------------------------------------------------------------- - require("mini.keymap").setup() - local map_combo = require("mini.keymap").map_combo - -- Support most common modes. This can also contain 't', but would - -- only mean to press `` inside terminal. - local mode = { "i", "c", "x", "s" } - map_combo(mode, "jk", "") - - -- To not have to worry about the order of keys, also map "kj" - map_combo(mode, "kj", "") - - -- Escape into Normal mode from Terminal mode - map_combo("t", "jk", "") - map_combo("t", "kj", "") - -- ======================================================================= -- mini.hues: useful for generating colorschemes -- ----------------------------------------------------------------------- diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 83fac7e..17365fe 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -32,7 +32,7 @@ return { config = function(_, opts) require("render-markdown").setup(opts) Snacks.toggle({ - name = "Render [M]arkdown", + name = "Render Markdown", get = require("render-markdown").get, set = require("render-markdown").set, }):map("um") diff --git a/lua/plugins/sidekick.lua b/lua/plugins/sidekick.lua new file mode 100644 index 0000000..d462134 --- /dev/null +++ b/lua/plugins/sidekick.lua @@ -0,0 +1,60 @@ +-- ============================================================================= +-- SIDEKICK.NVIM: AI Sidekick & CLI Integration +-- ----------------------------------------------------------------------------- +-- WHAT: Integrates GitHub Copilot's Next Edit Suggestions (NES) and provides +-- a terminal UI for various AI CLI tools (Claude, Gemini, etc.). +-- WHY: Replaces amp-ai with a more modern, context-aware AI integration. +-- HOW: Uses copilot.lua for NES and integrates with system AI CLIs. +-- NOTE: Tailored for Wezterm (mux disabled). +-- REFERENCE: https://github.com/folke/sidekick.nvim +-- ----------------------------------------------------------------------------- +return { + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + opts = { + suggestion = { enabled = false }, -- Managed by sidekick or blink + panel = { enabled = false }, + }, + }, + { + "folke/sidekick.nvim", + cmd = { "Sidekick" }, + opts = { + nes = { + enabled = true, + diff = { inline = "words" }, + }, + cli = { + mux = { enabled = false }, -- User uses Wezterm without tmux/zellij + }, + }, + keys = { + -- ----------------------------------------------------------------------- + -- AI Mnemonic Group (a) + -- ----------------------------------------------------------------------- + { + "aa", + function() require("sidekick.cli").toggle() end, + desc = "Toggle AI Sidekick", + }, + { + "as", + function() require("sidekick.cli").select() end, + desc = "Select AI Tool", + }, + { + "ap", + function() require("sidekick.cli").prompt() end, + mode = { "n", "x" }, + desc = "AI Prompts", + }, + { + "an", + function() return require("sidekick").nes_jump_or_apply() end, + desc = "NES Next Suggestion", + }, + }, + }, +} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index 2164391..d8da593 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -77,10 +77,10 @@ return { -- --------------------------------------------------------------------------- keys = { -- ------------------------------------------------------------------------- - -- GLOBAL: Top-level navigation & utilities + -- SMART/FAST SEARCH (ss) -- ------------------------------------------------------------------------- { - "/", + "ss", function() Snacks.picker.smart() end, desc = "Smart Search", }, @@ -97,173 +97,191 @@ return { { "t", function() Snacks.terminal() end, - desc = "[T]erminal", + desc = "Terminal", }, -- ------------------------------------------------------------------------- - -- BUFFER: Buffer operations + -- BUFFER: Buffer operations (b) -- ------------------------------------------------------------------------- { "bb", function() Snacks.picker.buffers() end, - desc = "[B]uffer", + desc = "Buffer List", }, { "bg", function() Snacks.picker.grep_buffers() end, - desc = "[G]rep Buffers", + desc = "Grep Buffers", }, { - "bq", + "bd", function() Snacks.bufdelete() end, - desc = "[Q]uit Buffer", + desc = "Delete Buffer", }, { "bS", function() Snacks.scratch.select() end, - desc = "[S]elect Scratch Buffer", + desc = "Select Scratch Buffer", }, -- ------------------------------------------------------------------------- - -- FILE: File & project navigation + -- FILE: File & project navigation (f) -- ------------------------------------------------------------------------- { "ff", function() Snacks.picker.files() end, - desc = "Find [F]iles", + desc = "Find Files", }, { "fp", function() Snacks.picker.projects() end, - desc = "Find [P]rojects", + desc = "Find Projects", }, { "fr", function() Snacks.picker.recent() end, - desc = "Find [R]ecent", + desc = "Find Recent", }, { "fR", function() Snacks.rename.rename_file() end, - desc = "[R]ename File", - }, - { - "fw", - function() Snacks.picker.grep_word() end, - desc = "Find/Grep [W]ord", - mode = { "n", "x" }, + desc = "Rename File", }, -- ------------------------------------------------------------------------- - -- GIT: Git operations & GitHub integration + -- GIT: Git operations (g) -- ------------------------------------------------------------------------- { - "gb", - function() Snacks.picker.git_branches() end, - desc = "[B]ranches", + "gg", + function() Snacks.lazygit() end, + desc = "LazyGit", }, { - "gB", - function() Snacks.gitbrowse() end, - desc = "[B]rowser", - mode = { "n", "v" }, + "gs", + function() Snacks.picker.git_status() end, + desc = "Git Status", + }, + { + "gl", + function() Snacks.picker.git_log() end, + desc = "Git Log", }, { "gd", function() Snacks.picker.git_diff() end, - desc = "[D]iff (Hunks)", + desc = "Git Diff (Hunks)", }, { - "gf", - function() Snacks.picker.git_files() end, - desc = "[F]iles", + "gb", + function() Snacks.picker.git_branches() end, + desc = "Git Branches", }, { - "gF", - function() Snacks.picker.git_log_file() end, - desc = "Log [F]ile", + "gB", + function() Snacks.gitbrowse() end, + desc = "Git Browser", + mode = { "n", "v" }, }, + + -- ------------------------------------------------------------------------- + -- SEARCH: Extended search (s) + -- ------------------------------------------------------------------------- { - "gg", - function() Snacks.lazygit() end, - desc = "Lazy[g]it", + "sg", + function() Snacks.picker.grep() end, + desc = "Grep Search", }, { - "gi", - function() Snacks.picker.gh_issue() end, - desc = "[I]ssues (open)", + "sw", + function() Snacks.picker.grep_word() end, + desc = "Grep Word", + mode = { "n", "x" }, }, { - "gI", - function() Snacks.picker.gh_issue({ state = "all" }) end, - desc = "[I]ssues (all)", + "sh", + function() Snacks.picker.search_history() end, + desc = "Search History", }, { - "gl", - function() Snacks.picker.git_log() end, - desc = "[L]og", + "sr", + function() Snacks.picker.resume() end, + desc = "Resume Search", }, { - "gL", - function() Snacks.picker.git_log_line() end, - desc = "Log [L]ine", + "su", + function() Snacks.picker.undo() end, + desc = "Undo History", }, + + -- ------------------------------------------------------------------------- + -- CODE: LSP & Diagnostics (c) + -- ------------------------------------------------------------------------- { - "gp", - function() Snacks.picker.gh_pr() end, - desc = "[P]ull Requests (open)", + "ca", + vim.lsp.buf.code_action, + desc = "Code Action", + mode = { "n", "x" }, }, { - "gP", - function() Snacks.picker.gh_pr({ state = "all" }) end, - desc = "[P]ull Requests (all)", + "cr", + vim.lsp.buf.rename, + desc = "Rename Symbol", }, { - "gs", - function() Snacks.picker.git_status() end, - desc = "[S]tatus", + "cs", + function() Snacks.picker.lsp_symbols() end, + desc = "LSP Symbols", }, { - "gS", - function() Snacks.picker.git_stash() end, - desc = "[S]tash", + "cd", + function() Snacks.picker.diagnostics() end, + desc = "Diagnostics", + }, + { + "cl", + function() Snacks.picker.lsp_config() end, + desc = "LSP Info", }, -- ------------------------------------------------------------------------- - -- HELP: Documentation & configuration + -- UI: Interface toggles (u) -- ------------------------------------------------------------------------- { - "ha", - function() Snacks.picker.autocmds() end, - desc = "Explore [A]utocmds", + "uz", + function() Snacks.zen() end, + desc = "Zen Mode", }, { - "hc", - function() - Snacks.picker.files({ - cwd = vim.fn.stdpath("config"), - }) - end, - desc = "HYPERfix [C]onfig Files", + "uZ", + function() Snacks.zen.zoom() end, + desc = "Zoom Window", }, + + -- ------------------------------------------------------------------------- + -- HELP: Documentation (h) + -- ------------------------------------------------------------------------- { "hh", function() Snacks.picker.help() end, - desc = "[H]elp Pages", + desc = "Help Pages", }, { "hk", function() Snacks.picker.keymaps() end, - desc = "[K]eymaps", + desc = "Keymaps", }, + + -- ------------------------------------------------------------------------- + -- NOTIFICATIONS (n) + -- ------------------------------------------------------------------------- { "nn", function() Snacks.picker.notifications() end, - desc = "[N]otification History", + desc = "Notification History", }, { "nN", - desc = "[N]eovim News", + desc = "Neovim News", function() Snacks.win({ file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1], @@ -281,115 +299,7 @@ return { }, -- ------------------------------------------------------------------------- - -- SEARCH: Search & inspection utilities - -- ------------------------------------------------------------------------- - { - "sc", - function() Snacks.picker.commands() end, - desc = "[C]ommands", - }, - { - "sd", - function() Snacks.picker.diagnostics() end, - desc = "[D]iagnostics", - }, - { - "sD", - function() Snacks.picker.diagnostics_buffer() end, - desc = "Buffer [D]iagnostics", - }, - { - "sg", - function() Snacks.picker.grep() end, - desc = "[G]rep", - }, - { - "sh", - function() Snacks.picker.search_history() end, - desc = "[H]istory", - }, - { - "sH", - function() Snacks.picker.highlights() end, - desc = "[H]ighlights", - }, - { - "si", - function() Snacks.picker.icons() end, - desc = "[I]cons", - }, - { - "sj", - function() Snacks.picker.jumps() end, - desc = "[J]umps", - }, - { - "sl", - function() Snacks.picker.lines() end, - desc = "[L]ines", - }, - { - "sL", - function() Snacks.picker.loclist() end, - desc = "[L]ocation", - }, - { - "sm", - function() Snacks.picker.marks() end, - desc = "[M]arks", - }, - { - "sx", - function() Snacks.picker.registers() end, - desc = "Register Inde[x]", - }, - { - "sR", - function() Snacks.picker.resume() end, - desc = "[R]esume Search", - }, - { - "su", - function() Snacks.picker.undo() end, - desc = "[U]ndo History", - }, - { - "sq", - function() Snacks.picker.qflist() end, - desc = "[Q]uickfix", - }, - { - "ss", - function() Snacks.picker.lsp_symbols() end, - desc = "LSP [S]ymbols", - }, - { - "sS", - function() Snacks.picker.lsp_workspace_symbols() end, - desc = "LSP Workspace [S]ymbols", - }, - - -- ------------------------------------------------------------------------- - -- UI: Interface toggles & settings - -- ------------------------------------------------------------------------- - { - "uC", - function() Snacks.picker.colorschemes() end, - desc = "[C]olorschemes", - }, - { - "uz", - function() Snacks.zen() end, - desc = "[Z]en Mode", - }, - { - "uZ", - function() Snacks.zen.zoom() end, - desc = "[Z]oom", - }, - - -- ------------------------------------------------------------------------- - -- NAVIGATION: Navigation & reference jumping + -- NAVIGATION -- ------------------------------------------------------------------------- { "]]", @@ -404,82 +314,40 @@ return { mode = { "n", "t" }, }, { - "qD", + "qd", function() Snacks.dashboard() end, - desc = "[D]ashboard", + desc = "Dashboard", }, -- ------------------------------------------------------------------------- - -- LSP: Language server picker operations (definitions, references, etc.) + -- LSP NAVIGATION (Standard g-prefixes) -- ------------------------------------------------------------------------- { "gd", function() Snacks.picker.lsp_definitions() end, - desc = "[D]efinition", + desc = "Definition", }, { "gD", function() Snacks.picker.lsp_declarations() end, - desc = "[D]eclaration", - }, - { - "gi", - function() Snacks.picker.lsp_incoming_calls() end, - desc = "Calls [I]ncoming", + desc = "Declaration", }, { "gI", function() Snacks.picker.lsp_implementations() end, - desc = "[I]mplementation", - }, - { - "go", - function() Snacks.picker.lsp_outgoing_calls() end, - desc = "Calls [O]utgoing", + desc = "Implementation", }, { "gR", function() Snacks.picker.lsp_references() end, nowait = true, - desc = "[R]eferences", + desc = "References", }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "T[y]pe Definition", }, - { - "cl", - function() Snacks.picker.lsp_config() end, - desc = "[L]sp Info", - }, - - -- ------------------------------------------------------------------------- - -- LSP ACTIONS: LSP buffer operations - -- ------------------------------------------------------------------------- - { - "ca", - vim.lsp.buf.code_action, - desc = "[A]ction", - mode = { "n", "x" }, - }, - { - "cc", - vim.lsp.codelens.run, - desc = "[C]odelens", - mode = { "n", "x" }, - }, - { - "cC", - vim.lsp.codelens.refresh, - desc = "Refresh [C]odelens", - mode = { "n" }, - }, - { - "cr", - vim.lsp.buf.rename, - desc = "[R]ename", - }, }, -- --------------------------------------------------------------------------- @@ -504,29 +372,29 @@ return { -- Toggle Mappings: Create toggles for UI features (with u) -- --------------------------------------------------------------------- Snacks.toggle.animate():map("ua") - Snacks.toggle.diagnostics({ name = "[D]iagnostics" }):map("ud") + Snacks.toggle.diagnostics({ name = "Diagnostics" }):map("ud") Snacks.toggle.dim():map("uD", { desc = "Dim" }) Snacks.toggle.indent():map("ug", { desc = "Indent Guides" }) - Snacks.toggle.line_number({ name = "[L]ine number" }):map("ul") - Snacks.toggle.inlay_hints({ name = "Inlay [H]ints" }):map("uh") - Snacks.toggle.option("spell", { name = "[S]pelling" }):map("us") + Snacks.toggle.line_number({ name = "Line Numbers" }):map("ul") + Snacks.toggle.inlay_hints({ name = "Inlay Hints" }):map("uh") + Snacks.toggle.option("spell", { name = "Spelling" }):map("us") Snacks.toggle.scroll():map("uS") - Snacks.toggle.option("wrap", { name = "[W]rap" }):map("uw") + Snacks.toggle.option("wrap", { name = "Wrap" }):map("uw") Snacks.toggle .option("conceallevel", { - name = "[C]onceal", + name = "Conceal", off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, }) :map("uc") Snacks.toggle - .option("relativenumber", { name = "Re[l]ative Number" }) + .option("relativenumber", { name = "Relative Numbers" }) :map("uL") Snacks.toggle - .treesitter({ name = "[T]reesitter Highlights" }) + .treesitter({ name = "Treesitter Highlights" }) :map("uT") end, }) diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 97a11b5..231c880 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -89,29 +89,12 @@ return { { "]t", function() require("todo-comments").jump_next() end, - desc = "Next [T]odo Comment", + desc = "Next Todo Comment", }, { "[t", function() require("todo-comments").jump_prev() end, - desc = "Prev [T]odo Comment", - }, - - -- ===================================================================== - -- Trouble Integration: Sidebar view of all todos - -- ===================================================================== - -- WHAT: Show all project todos in Trouble (sidebar UI) with filtering - -- WHY: Get an overview of all todos organized in a sidebar window - -- HOW: Trouble parses todo-comments output and displays in a list - { - "xt", - "Trouble todo toggle", - desc = "[T]odo", - }, - { - "xT", - "Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}", - desc = "[T]odo/Fix/Fixme", + desc = "Prev Todo Comment", }, -- ===================================================================== @@ -125,12 +108,12 @@ return { { "st", function() Snacks.picker.grep({ pattern = "TODO|HACK|NOTE|PERF|TEST" }) end, - desc = "[T]odo", + desc = "Todo", }, { "sT", function() Snacks.picker.grep({ pattern = "TODO|FIX|FIXME" }) end, - desc = "[T]odo/Fix/Fixme", + desc = "Todo/Fix/Fixme", }, }, }, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 5b587c7..a64a25a 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -40,7 +40,7 @@ return { opts = function() local tsc = require("treesitter-context") Snacks.toggle({ - name = "[T]reesitter Context", + name = "Treesitter Context", get = tsc.enabled, set = function(state) if state then diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua deleted file mode 100644 index f7bf6ea..0000000 --- a/lua/plugins/trouble.lua +++ /dev/null @@ -1,72 +0,0 @@ --- ============================================================================= --- TROUBLE.NVIM: Diagnostics & Quickfix Panel --- ============================================================================= --- WHAT: Unified sidebar for viewing diagnostics, symbols, quickfix, and location lists --- WHY: Makes errors/warnings easier to scan and navigate than inline diagnostics alone --- HOW: Toggle sidebar with x? commands; navigate with x? or [q/]q --- NOTE: Auto-integrates with LSP diagnostics and location lists; also shows symbols --- REFERENCE: https://github.com/folke/trouble.nvim --- KEYMAPS: xd/xD (diagnostics), xs (symbols), xl (location), xq (quickfix) --- RELATED: lua/plugins/lsp.lua (diagnostics), lua/plugins/snacks.lua (picker integration) --- =============================================================================------------------------------------------------------------------- -return { - "folke/trouble.nvim", - lazy = true, - cmd = { "Trouble" }, - opts = { - modes = { - lsp = { - win = { position = "right" }, -- LSP symbols appear on right side - }, - }, - }, - keys = { - { - "xd", - "Trouble diagnostics toggle", - desc = "[D]iagnostics", - }, - { - "xD", - "Trouble diagnostics toggle filter.buf=0", - desc = "Buffer [D]iagnostics", - }, - { "xs", "Trouble symbols toggle", desc = "[S]ymbols" }, - { - "xl", - "Trouble loclist toggle", - desc = "[L]ocation List", - }, - { - "xq", - "Trouble qflist toggle", - desc = "[Q]uickfix List", - }, - { - "[q", - function() - -- If Trouble is open, use Trouble navigation; otherwise use quickfix - if require("trouble").is_open() then - require("trouble").prev({ skip_groups = true, jump = true }) - else - local ok, err = pcall(vim.cmd.cprev) - if not ok then vim.notify(err, vim.log.levels.ERROR) end - end - end, - desc = "Prev [Q]uickfix Item", - }, - { - "]q", - function() - -- If Trouble is open, use Trouble navigation; otherwise use quickfix - if require("trouble").is_open() then - require("trouble").next({ skip_groups = true, jump = true }) - else - local ok, err = pcall(vim.cmd.cnext) - if not ok then vim.notify(err, vim.log.levels.ERROR) end - end - end, - desc = "Next [Q]uickfix Item", - }, - }, -} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 34ddcd8..4aaf0b0 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -37,11 +37,12 @@ return { icon = "󱕴", }, { - "e", - icon = "󰨁", -- File explorer toggle + "\\", + desc = "Explorer", + icon = "", }, { - "/", + "ss", desc = "Smart Search", icon = "󰬯", }, @@ -62,8 +63,8 @@ return { }, { "t", - desc = "[T]erminal", - icon = "󱃏", + desc = "Terminal", + icon = "", }, -- ===================================================================== @@ -71,67 +72,59 @@ return { -- --------------------------------------------------------------------- { "", - group = "[TAB]", - icon = "", + group = "Tabs", + icon = "", }, { - "q", - icon = "", + "a", + group = "AI", + icon = "󱨚", }, { - "", - icon = "", + "b", + group = "Buffers", + icon = "󰯃", }, { "c", - group = "[C]ode", + group = "Code", icon = "󰓥", }, - { - "d", - group = "[D]ebug", - icon = "󱇫", - }, { "f", - group = "[F]ile/Find", - icon = "󰆌", + group = "Files", + icon = "󱄯", }, { "g", - group = "[G]it", + group = "Git", icon = "󰊢", }, { "h", - group = "[H]elp", + group = "Help", icon = "", }, { "n", - group = "[N]otification", + group = "Notifications", icon = "󰷠", }, { "q", - group = "[Q]uit/Session", + group = "Quit & Sessions", icon = "󰋣", }, { "s", - group = "[S]earch", + group = "Search", icon = "", }, { "u", - group = "[U]I", + group = "UI", icon = "󱞠", }, - { - "x", - group = "Inde[x]", - icon = "󰴮", - }, -- ===================================================================== -- Motion Groups (built-in vim motions) @@ -140,7 +133,7 @@ return { { "]", group = "Next" }, { "g", - group = "[G]oto", + group = "Goto", icon = "󱡮", }, { @@ -152,15 +145,9 @@ return { -- ===================================================================== -- Dynamic Groups (auto-expanded based on buffer state) -- --------------------------------------------------------------------- - { - "b", - group = "[B]uffer", - expand = function() return require("which-key.extras").expand.buf() end, - icon = "󰯃", - }, { "w", - group = "[W]indows", + group = "Windows", proxy = "", -- Proxy to Vim's window commands expand = function() return require("which-key.extras").expand.win() end, icon = "󰮕", diff --git a/lua/snacks-dashboard.lua b/lua/snacks-dashboard.lua index 52a6065..5bb3a24 100644 --- a/lua/snacks-dashboard.lua +++ b/lua/snacks-dashboard.lua @@ -58,7 +58,7 @@ return { if has_fortune or has_cowsay or has_bat or has_lolcat then -- Start with fortune if available, otherwise a thank you message local cmd = has_fortune and "fortune -s" - or 'echo "Thank you for using HYPERfix.nvim!"' + or 'echo "Thank you for using HyperFix.nvim!"' -- Add cowsay if available (converts output to ASCII art speech bubble) if has_cowsay then cmd = cmd .. " | cowsay" end