This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a personal Neovim configuration using lazy.nvim as the plugin manager. The config is organized under the phaezer namespace with a modular structure.
init.lua: Entry point that loads core config and bootstraps lazy.nvimlua/phaezer/config/: Core Neovim configurations loaded at startupinit.lua: Orchestrates loading of all config modulesopt.lua: Vim optionskeymap.lua: Base keybindingslsp.lua: LSP system configuration with custom toggle/diagnostic featuresvars.lua: Global variablesuser_commands.lua: Custom user commandsautocmd.lua: Autocommandshighlights.lua: Highlight groups
lua/phaezer/core/: Shared utilities used throughout the configkeys.lua: Keymap helper functionsicons.lua: Icon definitionsutil.lua: General utilitiescolors.lua: Color utilitiesfiles.lua: File operationsmodules.lua: Module loading helpers
lua/phaezer/plugins/: Plugin configurations organized by category- Each plugin file returns a lazy.nvim spec table
lsp/: Individual LSP server configurations- Each file exports a config table with
name,cmd,filetypes,root_markers,settings - LSP files are auto-discovered and enabled via
vim.lsp.enable()inconfig/lsp.lua
- Each file exports a config table with
Plugins are categorized into subdirectories:
ai/: AI assistants (copilot, avante, opencode, sidekick)completion/: Completion engines (blink.cmp, luasnip)editing/: Text editing enhancements (surround, pairs, substitute, etc.)vcs/: Git integrations (gitsigns, lazygit, neogit, fugitive, diffview)lsp/: LSP related plugins (mason, conform, trouble, outline, etc.)ui/: UI enhancements (lualine, neotree, snacks, whichkey, etc.)navigation/: Navigation tools (flash, mini-ai, todo-comments)highlights/: Syntax and visual highlighting (treesitter, rainbow-delimiters, etc.)tools/: Utility plugins (toggleterm, floaterm, overseer, dadbod, etc.)text/: Text/document specific (obsidian, markview, headlines, etc.)themes/: Colorschemeslangs/: Language-specific plugins organized by language (ansible/, go/, rust/)folding/: Code folding (ufo)integrations/: External tool integrations (kitty, tmux)debug/: Debug adapters (dap-python, dap-go)experimental/: Experimental plugins (only loaded if NVIM_EXPERIMENTAL env var is set)
The LSP configuration (lua/phaezer/config/lsp.lua) implements:
- Auto-discovery: Scans
lsp/*.luafor server configs and auto-enables them - Global capabilities: Configures folding support for all LSP servers
- Diagnostic modes: Custom diagnostic display modes (minimal, default, detailed, detailed_lines)
- Toggle with
:SetDiagnosticConfig <mode>
- Toggle with
- LSP Toggle: Ability to enable/disable individual LSP servers without restarting Neovim
:ToggleLSP <name>or:ToggleLSPSelectfor interactive selection
- Custom middleware: Intercepts
buf_attach_clientto track attached buffers and prevent reattachment when disabled
The custom keymap system (lua/phaezer/core/keys.lua) provides:
map()function that accepts table-based keybinding definitions- Support for common options like
mode,prefix,desc,plugin - OS-specific and VS Code-specific keybinding filtering
- Automatic plugin attribution in descriptions
Example usage:
map {
mode = 'n',
prefix = '<leader>w',
{ 's', '<CMD>split<CR>', desc = 'split' },
{ 'v', '<CMD>vsplit<CR>', desc = 'split |' },
}Default theme is tokyonight, but can be overridden with NVIM_THEME environment variable.
- Leader key:
<Space> - Local leader:
<Space> - Window management:
<leader>wprefix - Buffer management:
<leader>bprefix - Diagnostics/LSP:
<leader>xprefix - Actions:
<leader>kprefix - UI toggles:
<leader>uprefix - File explorer:
<leader>eor<leader>nprefix - Terminal:
<C->(horizontal),t` prefix for others - Inspections:
<leader>iprefix
- Create a new file in the appropriate
lua/phaezer/plugins/<category>/directory - Return a lazy.nvim spec table
- Add keybindings using the
keysproperty or vialua/phaezer/config/keymap.lua
- Create a new file
lsp/<servername>.lua - Export a table with:
name,cmd,filetypes,root_markers,settings - The LSP will be auto-discovered and enabled on next restart
Uses blink.cmp with multiple sources:
- LSP (highest priority, score_offset=100)
- Path, Buffer, Snippets, Ripgrep
- Copilot integration
- Dadbod for SQL files
- LazyDev for Lua files
- Dictionary for markdown/norg files
Completion can be toggled on/off with <leader>kc.
:SetDiagnosticConfig <mode>: Change diagnostic display mode:ToggleLSP <name>: Toggle specific LSP on/off:ToggleLSPSelect: Interactive LSP toggle menu
Local development plugins are stored in ~/projects/nvim and pattern-matched with phaezer.