Modern Neovim setup with < 300ms startup, AI integration, and ~54 plugins managed by lazy.nvim.
src/neovim/
βββ core/ # Core settings (7 files)
β βββ init.lua # Module loader
β βββ options.lua # Editor options (incl. spellfile from the private repo)
β βββ performance.lua # Speed optimizations
β βββ backup.lua # Backup/swap/undo settings
β βββ folding.lua # Code folding config
β βββ indentation.lua # Tab/space settings
β βββ search.lua # Search behavior
βββ keymaps/ # Key binding definitions (6 files)
β βββ core.lua # Essential mappings
β βββ navigation.lua # Buffer, window, and file navigation
β βββ editing.lua # Text editing enhancements
β βββ lsp.lua # LSP and diagnostic mappings
β βββ plugins.lua # Plugin-specific mappings
β βββ debug.lua # DAP debugging mappings
βββ plugins/ # Plugin configs (10 files)
β βββ ai.lua # CodeCompanion setup
β βββ completion.lua # Blink.cmp config
β βββ init.lua # Module notes
β βββ markdown-editing.lua # Markdown editing helpers (markdown.nvim)
β βββ markdown-render.lua # In-buffer rendering (render-markdown.nvim)
β βββ markdown-preview.lua # Browser preview (markdown-preview.nvim)
β βββ minuet.lua # Minuet AI inline completion
β βββ snacks.lua # Quality-of-life utilities (explorer, lazygit, zen, scratch)
β βββ snippets.lua # LuaSnip config
β βββ vimtex.lua # LaTeX support
βββ snippets/ # Language-specific snippets (10 files)
βββ init.lua # Entry point with path detection
βββ autocmds.lua # Autocommands, skeleton files, style-guide indentation
βββ commands.lua # Custom commands
βββ error-handler.lua # Error handling
βββ fixy.lua # Production auto-formatter
βββ gitsigns.lua # Git signs configuration
βββ keymaps.lua # Keymap module loader (sets leader, loads keymaps/*)
βββ logging.lua # Logging utilities (level via $NVIM_LOG_LEVEL)
βββ lsp.lua # LSP configurations (20+ servers)
βββ plugins.lua # Plugin specifications (~54 plugins)
βββ telescope.lua # Telescope configuration
βββ ui.lua # Theme and appearance
βββ utils.lua # Utility functions
βββ work.lua # Work detection utilities
βββ work-init.lua # Work-specific initialization
Config-loading gotcha:
gitsigns.luaandtelescope.luashare their names with plugin Lua modules, and the pluginβs runtimepath wins over thepackage.pathentriesinit.luaadds. They are therefore loaded by explicit path (dofile) inplugins.lua, never viarequire()/load_config().
# Installation (plugins auto-install on first run)
ln -sf ~/.dotfiles/src/neovim ~/.config/nvim
nvim
# Health check
:checkhealth
# Plugin management
:Lazy # Plugin manager UI
:Lazy profile # Performance profiling
:Mason # LSP installer
<leader>f - Find (Telescope)<leader>c - Code (symbols, LSP, run)<leader>g - Git operations<leader>a - AI assistant (CodeCompanion)<leader>o - Open (explorer, terminal)<C-p> - Find filesK - Hover documentationFull reference: keymaps/KEYMAPS.md
Web: TypeScript, JavaScript, HTML, CSS Systems: Rust, C/C++, Go, Zig Scripting: Python, Ruby, Bash, Lua Data: YAML, TOML, JSON, XML Docs: Markdown, LaTeX
The nvim-treesitter spec is pinned to the main branch (the repoβs default
branch is the legacy master, which uses a removed API). On main there are no
highlight/indent modules: parsers are installed with
require("nvim-treesitter").install({...}) and highlighting is enabled
per-buffer by a FileType autocmd calling vim.treesitter.start() (see the
spec in plugins.lua). Parser builds require the tree-sitter CLI
(brew install tree-sitter-cli) plus a C compiler. Markdown folds
intentionally come from the runtime ftplugin (g.markdown_folding, see
core/folding.lua), not treesitter.
<leader>a*)<leader>aM / <leader>aO),
model size switching via <leader>a1-a3:Lazy profile and nvim --startuptime /tmp/startup.logSilent, robust formatting integrated with the repo-wide fixy formatter:
:Fixy " Format current file
:FixyAuto " Toggle auto-format
:FixyStatus " Show status
:FixyDebug " Toggle debug mode
plugins.lua, complex configs in plugins/lsp.luakeymaps/.dotfiles.private/Slow startup: :Lazy profile to identify slow plugins
LSP issues: :LspInfo and :Mason for server status
Completion not working: Check :lua =vim.lsp.get_clients()
Theme issues: Verify theme command and $MACOS_THEME
Treesitter issues: :checkhealth nvim-treesitter; :TSReset resets the
current buffer; :TSLog shows installer logs
Debug logging: start with NVIM_LOG_LEVEL=DEBUG nvim; logs go to
~/.local/state/nvim/work-debug.log (see logging.lua)
VeryLazy event prevents UI blocking