add-plugin
Add a new lazy.nvim plugin spec following project conventions
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
When adding a new plugin spec to this Neovim config, follow these conventions exactly:
File placement
Put the spec in lua/plugins/<category>.lua based on the plugin's purpose:
- Editing aids →
editor.lua - Git tools →
git.lua - LSP/completion →
lsp.luaorcompletion.lua - UI/appearance →
ui.lua - Fuzzy finding/navigation →
picker.lua - Treesitter-related →
treesitter.lua - If unsure, look at existing file categories
Spec format
Always use declarative opts = {} instead of config = function() unless setup
requires conditional logic or calling multiple functions.
{
'author/plugin-name',
event = 'VeryLazy', -- or appropriate lazy-load trigger
dependencies = {},
opts = {
-- plugin options here
},
keys = {
{ '<leader>xx', '<cmd>PluginCmd<cr>', desc = 'Plugin: action description' },
},
},
Required conventions
-
Lazy loading: always use
event,cmd, orkeystriggers. Only uselazy = falsefor plugins that must load at startup (colorscheme, etc.). -
Keymaps: every keymap entry must have a
descfield. Use the format'Category: action'(e.g.'Git: open neogit','LSP: rename symbol'). -
Border: set
border = 'single'for any UI component that accepts it (floating windows, pickers, hover docs, etc.). -
Leader prefix: group related keymaps under a
<leader><letter>prefix. Checklua/config/keymaps.luato see existing prefixes and avoid conflicts. -
Style: 2-space indent, single quotes, trailing commas after every item. StyLua enforces this, but match it manually for consistency.
Example: adding a new picker integration
{
'author/new-picker',
cmd = 'NewPicker',
opts = {
border = 'single',
layout = { width = 0.8, height = 0.6 },
},
keys = {
{ '<leader>fp', '<cmd>NewPicker<cr>', desc = 'Picker: find something' },
},
},
After adding, run make all to validate formatting and lint.
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-03-11
- Index updated
- 2026-03-11
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!