Files
nvim/CLAUDE.md
T
holgerandClaude Opus 5.5 2d37451f02 added shfmt for shell scripts
Format sh/bash files with shfmt via conform and install it through
mason-tool-installer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 20:40:40 +02:00

3.3 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 three modules:

  • holger.core — Neovim options and keymaps (lua/holger/core/)
  • holger.lazy — bootstraps lazy.nvim and loads all plugins
  • holger.lsp — LSP keymaps and diagnostic signs

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: html, cssls, lua_ls, pyright
  • mason-tool-installer.nvim — installs formatters/linters: prettier, stylua, isort, black, pylint, shfmt
  • blink.cmp (lua/holger/plugins/blink-cmp.lua) — sets up LSP capabilities via vim.lsp.config("*", ...) (native Neovim LSP API)
  • lazydev.nvim — Lua LSP annotations for Neovim API (vim.*)

Completion

  • blink.cmp — completion engine with built-in LSP, buffer, path, and snippet sources
    • Replaces: nvim-cmp, cmp-nvim-lsp, LuaSnip, lspkind, nvim-autopairs
    • Snippets loaded from friendly-snippets
    • Auto-brackets enabled (replaces nvim-autopairs)

Formatting & Linting

  • conform.nvim — formats on save; <leader>mp to format manually
    • CSS/HTML/JSON/YAML/Markdown/GraphQL → prettier
    • Lua → stylua
    • Python → isort + black
    • Shell (sh/bash) → shfmt
  • 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>)
  • blink.cmp — completion engine with LSP/buffer/path/snippet sources
  • flash.nvim — enhanced motion with jump labels; integrated into / search
  • auto-session — automatic session save/restore
  • which-key — displays keybinding hints
  • fugitive — Git integration
  • trouble.nvim — diagnostics list
  • lazydev.nvim — Lua LSP support for Neovim config development