This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Personal Neovim configuration targeting Neovim nightly (v0.12+). Written entirely in Lua, using the native vim.pack API for plugin management (no lazy.nvim or packer). Primary languages: PHP (Laravel/Sail), TypeScript/JavaScript, Dart/Flutter.
core/options.lua- vim options (4-space tabs, space leader)core/keymaps.lua- global keymapscore/autocmds.lua- autocommandscore/plugins.lua- the ONLY file that callsvim.pack.addplugins/*.lua- auto-loaded by iteratinglua/plugins/directorylsp/init.lua- LSP setup
All plugins are declared in core/plugins.lua via vim.pack.add(). Plugin configuration files in lua/plugins/ must never call vim.pack.add — they only call require("plugin-name").setup({...}) and define keymaps.
init.lua- iteratesenabled_serverslist, loads per-server config fromlsp/servers/, applies shared capabilities and on_attachcapabilities.lua- shared LSP capabilitieson_attach.lua- default on_attach function with buffer-local keymaps (gd, gr, gi, K, etc.)keymaps.lua- global diagnostic keymaps (<leader>dgroup)servers/<name>.lua- each returns a table merged into the server config. If it includes anon_attach, that replaces the default
Uses vim.lsp.config() + vim.lsp.enable() (native Neovim 0.11+ API), not lspconfig's setup().
- Add
{ src = "https://github.com/..." }tocore/plugins.lua - Create
lua/plugins/<name>.luawith setup and keymaps (auto-loaded)
- Create
lua/lsp/servers/<name>.luareturning a config table - Add the server name to
enabled_serversinlua/lsp/init.lua
- Comments and keymap descriptions are in Brazilian Portuguese
- Leader key is
<Space> - Formatting on save via conform.nvim (stylua for Lua, prettier for HTML/JSON/YAML, biome for TS, php_cs_fixer for PHP, blade_formatter for Blade)
- FZF-lua is the primary fuzzy finder (replaces Telescope);
<leader>lgroup routes LSP queries through FZF - Testing uses neotest + neotest-phpunit running through Laravel Sail (
vendor/bin/sail test), with container-to-host path mapping for JUnit XML results - DAP configured for PHP (Xdebug) and Dart/Flutter
- There is also a top-level
lsp/tailwindcss.lua(Neovim's nativelsp/directory for vim.lsp.config) separate fromlua/lsp/servers/tailwindcss.lua
# Neovim nightly is launched via alias
nn
# Check config for errors
nn --headless +"lua print('ok')" +qa
# Sync plugins (vim.pack downloads on first use)
# Just restart Neovim - vim.pack.add with load=true handles it
# Format Lua files
stylua lua/