A modular Neovim configuration built on lazy.nvim helpers, with plugins split into focused categories.
nvim/
├── init.lua # Entry point that loads the config module
├── lua/
│ ├── config/ # Core configuration
│ │ ├── init.lua # Loads options, keymaps, autocmds, lazy, file types
│ │ ├── options.lua # Editor options
│ │ ├── keymap.lua # Key mappings
│ │ ├── autocmds.lua # Autocommands
│ │ ├── file_types.lua # Filetype defaults
│ │ ├── globals.lua # Global variables
│ │ ├── git.lua # Git-specific settings
│ │ ├── git-worktree-helpers.lua
│ │ ├── lazy.lua # lazy.nvim bootstrap
│ │ ├── lazyvim/ # LazyVim-style defaults, icons, and options
│ │ ├── ai/ # AI config (e.g., OpenCode prompts)
│ │ ├── languages/ # Language-specific setup (R, etc.)
│ │ └── system/ # OS-specific settings (WSL, Windows)
│ ├── plugins/ # Plugin specs grouped by purpose
│ │ ├── init.lua # Imports each subdirectory
│ │ ├── ai/ # Avante, Copilot, ChatGPT, OpenCode, MCP hub
│ │ ├── debugger/ # DAP and related helpers
│ │ ├── editor/ # Treesitter, Telescope, Harpoon, snippets, etc.
│ │ ├── git/ # Gitsigns, Diffview, Lazygit, worktree tooling
│ │ ├── goofing/ # Fun/experimental plugins
│ │ ├── languages/ # Markdown, Quarto, R, SQL, HTML, REPLs, compilers
│ │ ├── lsp/ # LSP core, completion, diagnostics
│ │ └── ui/ # Colors, statusline, dashboard, tabs, notifications
│ └── util/ # Shared helpers (LazyVim utilities, statusline, roots)
└── lazy-lock.json # Plugin version lock file
- Neovim starts and
init.lualoadsconfig/init.lua. config/init.luawires up core pieces first (options, keymaps, autocmds, filetype rules) and then bootstraps Lazy viaconfig/lazy.lua.- The same entry point applies OS-specific tweaks (e.g., WSL clipboard), git helpers, language setup (R), and utility keybindings.
config/lazy.luaensures lazy.nvim is on the runtimepath and points it atplugins/init.lua.plugins/init.luaimports each plugin category; lazy.nvim then lazy-loads individual specs as events/commands/filetypes are hit.- Shared defaults and icons live in
config/lazyvim/and are consumed by plugin specs and utilities.
- Fast startup with lazy-loaded plugins grouped by category (UI, LSP, git, editor tools, AI, debugger, language packs).
- Utility commands:
:WAsaves all buffers while creating missing dirs;<leader>jtoggles the current window to 50% width;<leader>ottriggers an Opencode prompt and resizes the REPL if there is one. - Git tooling: Gitsigns, Diffview, Lazygit, and worktree helpers for quick branch/worktree switches.
- Navigation and editing: Telescope pickers, Treesitter, Harpoon, surround/undo/indent helpers, snippets, table of contents, and text wrapping tools.
- UI polish: Colorscheme via lazy-loaded themes, statusline utilities, dashboard, tabs, notifications, and icon support.
- AI helpers: OpenCode and Copilot primarily. Many custom OpenCode.nvim enhancements. Also includes Avante, ChatGPT, and MCP integrations with convenient keybindings.
- Use radian as REPL.
- View data with visidata. View data up to select parts of a pipe chain (even if there's an assignment!).
- Filetype autocmds for
r,rmd, andquartoset buffer-local keymaps:<leader>Ctoggles comment on current line or selection.<leader>rf/<leader>ruformat/unformat function calls to multiline or single-line.<leader>ratoggles assigning the current pipe chain (name <- name |> ...).<leader>rptoggles a trailing native pipe (|>) on the current line.
- Custom fold expression for R headings (
#,##,###) with folds enabled by default in R buffers. - Helpers to assign defaults from the function under cursor into the R environment (expects R.nvim to be running and ready to receive commands).
- Clone to
~/.config/nvimand start Neovim; lazy.nvim will install the pinned plugins fromlazy-lock.json. - Adjust core behavior in
lua/config/(options, keymaps, file types, git helpers, OS-specific tweaks). - Add or tune plugins by dropping specs into the appropriate folder under
lua/plugins/. - Extend shared helpers in
lua/util/if you need new statusline/root/markdown utilities.
- After cloning, open Neovim and run
:Lazy restoreto install the exact plugin versions pinned inlazy-lock.json(use:Lazy syncif you also changed specs). - If you modify plugins and need to refresh the lockfile, run
:Lazy lockand commit the updatedlazy-lock.json.
- Core utility layer (
lua/utilandlua/config/lazyvim/*) and several plugin specs are adapted from the LazyVim project and its default configuration. - Plugin management and locking rely on lazy.nvim.
- Many individual plugin setups borrow patterns from their upstream READMEs and community dotfiles; there are likely more influences than can be comprehensively listed here.