nvim-plugin-add

Add and configure Neovim plugins with lazy.nvim while preventing keymap conflicts.

1|Updated Oct 17, 2016
One-click install
npx skills add https://github.com/tkancf/dotfiles --skill nvim-plugin-add
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nvim-plugin-add
Source: https://github.com/tkancf/dotfiles/tree/main/.codex/skills/nvim-plugin-add
Command: npx skills add https://github.com/tkancf/dotfiles --skill nvim-plugin-add

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you add and configure Neovim plugins in this dotfiles repo without breaking the existing lazy.nvim setup or introducing keymap conflicts.

Core Features & Use Cases

  • Plugin config module creation: Produces a lazy.nvim-compatible plugin spec module under config/nvim/lua/plugins/ for the selected plugin.
  • Correct lazy.nvim registration: Adds the required import entry in config/nvim/init.lua using the repo’s existing import pattern.
  • Keymap collision prevention: Checks existing keymaps (and which-key registrations, if present) before adding new mappings, then selects non-conflicting alternatives when needed.
  • Upstream-doc-driven setup: Reads the plugin’s README/docs and wires setup() with minimal, repo-conformant options.

Quick Start

Ask the AI to add the plugin <plugin-name> to config/nvim using lazy.nvim and include any needed keymaps, ensuring they do not conflict with existing mappings.

Frequently Asked Questions about nvim-plugin-add

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

FAQPage Schema
How do I add a Neovim plugin using lazy.nvim without breaking existing keymaps?

To add a Neovim plugin safely, create a Lua spec module under the plugins directory, update the lazy.nvim import list in init.lua, and check existing keymaps to prevent mapping conflicts. This ensures your new plugin integrates without overriding current key bindings.

What's the best way to configure a new lazy.nvim plugin spec from upstream documentation?

The best way to configure a lazy.nvim plugin spec is to read the plugin's upstream README, extract the minimal required setup options, and implement a self-contained Lua module that conforms to your repository's existing configuration conventions.

Why does my lazy.nvim plugin installation cause keymap conflicts in Neovim?

Keymap conflicts occur when new plugins register mappings that overlap with your existing layout. Prevent this by inspecting current keymaps and which-key registrations before adding new mappings, then selecting alternative non-conflicting prefixes and descriptions.

How do I wire a new Lua plugin module into init.lua for lazy.nvim?

Wire a new Lua plugin module by adding an import entry to init.lua using your repository's existing import pattern. This validates the lazy.nvim registration and ensures the plugin spec module is correctly loaded during Neovim startup.

Can I use lazy.nvim to manage plugins in a dotfiles repository?

Yes, lazy.nvim works in a dotfiles repository by placing self-contained Lua plugin specs under config/nvim/lua/plugins/ and registering them through the init.lua import list. This keeps plugin configuration modular and consistent across environments.

What are the limitations of adding Neovim plugins with lazy.nvim?

Limitations include the need to manually inspect repository conventions and existing keymaps before adding plugins. You must ensure new mappings use consistent prefixes and descriptions, and the setup requires updating Lua import lists to validate wiring correctly.