Files
nvim/CLAUDE.md
T
2026-03-02 20:05:52 +01:00

2.9 KiB

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 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: <Space>
  • 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; <leader>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; <leader>l to trigger manually
    • Python → pylint

Key Keymaps

Key Action
jk (insert) Exit insert mode
<leader>ee Toggle nvim-tree file explorer
<leader>ef Toggle explorer on current file
<leader>ff Telescope find files
<leader>fs Telescope live grep
<leader>fr Telescope recent files
<leader>fc Grep string under cursor
s / S Flash jump / Flash treesitter jump
<leader>mp Format file (conform)
<leader>l Trigger linting
<leader>sv/sh Split window vertical/horizontal
<leader>nh Clear search highlights

Notable Plugins

  • telescope.nvim — fuzzy finder with fzf-native extension
  • nvim-treesitter — syntax highlighting and incremental selection (<C-space>)
  • 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