From neovim-advisor
Profiles Neovim startup performance and optimizes lazy.nvim plugin loading with lazy-loading triggers, priorities, event specs, profiling workflows, and bottleneck checklists.
How this skill is triggered — by the user, by Claude, or both
Slash command
/neovim-advisor:lazy-nvim-optimizationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Diagnose and fix Neovim startup performance through profiling and targeted lazy-loading.
Diagnose and fix Neovim startup performance through profiling and targeted lazy-loading.
When a user reports slow startup, follow this sequence — don't skip to solutions.
nvim --startuptime startup.log && tail -1 startup.log
Compare against targets:
100ms: Needs work
:Lazy profile
Look for plugins with load time > 10ms. These are your optimization targets. Sort by time, not alphabetically.
Also check the startup log for:
setup() functions taking > 5msFor each slow plugin, choose the right trigger:
| Plugin Type | Trigger | Example |
|---|---|---|
| Has clear commands | cmd | cmd = "Telescope" |
| Accessed via keybindings | keys | keys = { "<leader>e" } |
| Language-specific | ft | ft = { "rust", "go" } |
| Needed after UI renders | event = "VeryLazy" | UI enhancements |
| Needed when editing | event = "BufReadPost" | Git signs, diagnostics |
| Needed in insert mode | event = "InsertEnter" | Completion, autopairs |
| Only used as dependency | lazy = true | plenary.nvim |
nvim --startuptime startup-after.log && tail -1 startup-after.log
Compare total times. Then :Lazy profile to verify plugins load when expected.
These need to load at startup — don't fight it:
priority = 1000 so it loads first. Visible flash if deferred.Synchronous system calls at startup:
-- Bad: blocks startup
vim.fn.system("git status")
-- Good: defer it
vim.defer_fn(function()
vim.fn.system("git status")
end, 100)
Loading all LSP servers at once: Consider loading LSP servers per-filetype instead of all at startup. Each server you don't load saves 5-15ms.
Plugins without any trigger:
A bare { "plugin/name" } spec loads at startup. Always add a trigger unless the plugin genuinely needs immediate availability.
priority = 1000InsertEnterVeryLazysetup() only runs when plugins load"*"For detailed information:
references/lazy-loading-decision-tree.md - Decision tree for choosing lazy-loading strategyreferences/profiling-guide.md - Advanced profiling techniquesnpx claudepluginhub kriscard/kriscard-claude-plugins --plugin neovim-advisorValidates, audits, and improves Neovim config (lazy.nvim, GNU Stow). Add plugins, diagnose issues, fix keymaps, and apply best practices.
Applies Neovim community best practices, plugin architecture patterns, and idiomatic Lua style when writing, reviewing, or refactoring Neovim plugins.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.