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.
npx claudepluginhub kriscard/kriscard-claude-plugins --plugin neovim-advisorThis skill uses the workspace's default tool permissions.
Diagnose and fix Neovim startup performance through profiling and targeted lazy-loading.
Applies Neovim community best practices, plugin architecture patterns, and idiomatic Lua style when writing, reviewing, or refactoring Neovim plugins.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
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 techniques