# Neovim

> When editing Neovim config, adding plugins, or optimizing startup time

- Skill: `nazozokc/neovim` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nazozokc/neovim`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nazozokc/neovim/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: nazozokc (https://skillmd.com/u/nazozokc)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nazozokc/neovim

---


# Neovim Configuration Guidelines

## When to Use

- When adding or removing plugins with `lazy.nvim`
- When optimizing startup time
- When changing LSP, DAP, or formatter configuration

## Basic Rules

- **Config lives under `~/.config/nvim/`**: Managed via dotfiles repository
- **Be conscious of lazy.nvim event specification**: Directly affects startup speed
- **No duplicate configs**: Before adding a plugin, confirm nothing already fills that role

## Plugin Addition Checklist

1. Check if a plugin with the same role already exists (e.g. formatters are unified under conform.nvim)
2. Consider whether lazy loading via `event` / `ft` / `cmd` is possible
3. Visual plugins should use `event = "VeryLazy"`
4. After adding, verify startup time with `--startuptime`

## lazy.nvim Event Guide

| Event         | Use Case                 |
| ------------- | ------------------------ |
| `VeryLazy`    | Colorschemes, UI plugins |
| `BufReadPre`  | File reading plugins     |
| `InsertEnter` | Completion, snippets     |
| `LspAttach`   | LSP-dependent plugins    |
| `cmd`         | Command-triggered only   |

## Notes

- Never call `require()` outside of `config` (it loads at startup)
- DAP and git plugins are especially prone to duplication — check carefully

