add-plugin

Create lazy.nvim plugin specs with triggers and keymaps in lua/plugins.

44|1|Updated Dec 10, 2023
One-click install
npx skills add https://github.com/ThorstenRhau/neovim --skill add-plugin-thorstenrhau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-plugin
Source: https://github.com/ThorstenRhau/neovim/tree/main/.claude/skills/add-plugin
Command: npx skills add https://github.com/ThorstenRhau/neovim --skill add-plugin-thorstenrhau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to adding a new lazy.nvim plugin spec that adheres to the project's conventions, ensuring consistency and reducing setup mistakes.

Core Features & Use Cases

  • Enforces placement of plugin specs under lua/plugins/<category>.lua based on purpose (editor, git, lsp, ui, picker, treesitter, etc.).
  • Mandates declarative opts, explicit lazy-load triggers, and properly documented keymaps with descriptive categories.
  • Supports automatic incorporation of UI borders and leader-key prefixes to align with existing config conventions.

Quick Start

Create a new lazy.nvim plugin spec placed in lua/plugins/<category>.lua following the project conventions.

Frequently Asked Questions about add-plugin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize new lazy.nvim plugin specs in my Neovim config?

To standardize lazy.nvim plugin specs, you enforce declarative opts, explicit lazy-load triggers, and documented keymaps. This ensures consistent file placement and valid Lua specs aligned with project conventions for immediate config use.

Where should lazy.nvim plugin specifications be placed in my repository?

Lazy.nvim plugin specifications should be placed under lua/plugins/<category>.lua files. Categorizing specs by purpose—such as editor, git, lsp, ui, picker, or treesitter—enforces repository style guidelines and maintains consistent configuration organization.

What is the best way to configure lazy-load triggers for a Neovim plugin?

The best way to configure lazy-load triggers is by defining explicit event, cmd, or keys attributes in the spec. This declarative approach ensures plugins load only when needed, reducing startup time and maintaining valid Lua configuration.

Can I automatically add borders and leader-key prefixes to new Neovim keymaps?

Yes, you can automatically incorporate UI borders and leader-key prefixes to align with existing config conventions. The specification process mandates properly documented keymaps with descriptive categories to ensure consistent user interface behavior.

Does adding a lazy.nvim plugin require manual configuration of file paths and categories?

No, adding a lazy.nvim plugin automates creation and placement to enforce project conventions. It categorizes specs by purpose under lua/plugins/ and produces a valid Lua spec with proper triggers, eliminating manual path configuration errors.

Why are declarative opts required when creating a lazy.nvim plugin specification?

Declarative opts are required to enforce project conventions and reduce setup mistakes. By mandating explicit lazy-load triggers and properly documented keymaps, the specification process ensures consistent file placement and valid Lua configuration across the repository.