# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Overview Personal Neovim configuration using [lazy.nvim](https://github.com/folke/lazy.nvim) as the plugin manager. All Lua code lives under the `holger` namespace in `lua/holger/`. ## Architecture **Entry point:** `init.lua` loads two modules: - `holger.core` — Neovim options and keymaps (`lua/holger/core/`) - `holger.lazy` — bootstraps lazy.nvim and loads all plugins **Plugin loading:** `lua/holger/lazy.lua` calls `require("lazy").setup()` with two import paths: - `holger.plugins` — all files in `lua/holger/plugins/` (each returns a lazy.nvim spec table) - `holger.plugins.lsp` — files in `lua/holger/plugins/lsp/` **Adding a plugin:** Create a new file in `lua/holger/plugins/` that returns a lazy.nvim spec table. It will be auto-imported. ## Key Configuration - **Leader key:** `` - **Colorscheme:** catppuccin - **Indentation:** 2 spaces, expandtab ## LSP Stack - `mason.nvim` — installs LSP servers and tools - `mason-lspconfig.nvim` — bridges Mason with nvim-lspconfig; auto-installs: `ts_ls`, `html`, `cssls`, `tailwindcss`, `lua_ls`, `pyright`, `eslint` - `mason-tool-installer.nvim` — installs formatters/linters: `prettier`, `stylua`, `isort`, `black`, `pylint`, `eslint_d` - `cmp-nvim-lsp` (`lua/holger/plugins/lsp/lspconfig.lua`) — sets up capabilities via `vim.lsp.config("*", ...)` (native Neovim LSP API) ## Formatting & Linting - **conform.nvim** — formats on save; `mp` to format manually - JS/TS/CSS/HTML/JSON/YAML/Markdown/GraphQL → prettier - Lua → stylua - Python → isort + black - **nvim-lint** — lints on BufEnter/BufWritePost/InsertLeave; `l` to trigger manually - Python → pylint ## Key Keymaps | Key | Action | |-----|--------| | `jk` (insert) | Exit insert mode | | `ee` | Toggle nvim-tree file explorer | | `ef` | Toggle explorer on current file | | `ff` | Telescope find files | | `fs` | Telescope live grep | | `fr` | Telescope recent files | | `fc` | Grep string under cursor | | `s` / `S` | Flash jump / Flash treesitter jump | | `mp` | Format file (conform) | | `l` | Trigger linting | | `sv/sh` | Split window vertical/horizontal | | `nh` | Clear search highlights | ## Notable Plugins - **telescope.nvim** — fuzzy finder with fzf-native extension - **nvim-treesitter** — syntax highlighting and incremental selection (``) - **nvim-cmp** — completion engine with LuaSnip snippets and LSP/buffer/path sources - **flash.nvim** — enhanced motion with jump labels; integrated into `/` search - **neorg** — note-taking, workspace at `~/notes` - **auto-session** — automatic session save/restore - **which-key** — displays keybinding hints - **fugitive** — Git integration - **trouble.nvim** — diagnostics list