effective-neovim

Apply best practices from the Neovim community to write clean, idiomatic Lua plugins.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "effective-neovim" with this command: npx skills add kylesnowschwartz/simpleclaude/kylesnowschwartz-simpleclaude-effective-neovim

Effective Neovim

Apply best practices from the Neovim community to write clean, idiomatic Lua plugins.

When to Apply

Use this skill automatically when:

  • Writing new Neovim plugins in Lua

  • Reviewing Neovim plugin code

  • Refactoring existing plugin implementations

Tooling

The Type A Neovim developers use:

Tool Purpose

StyLua Formatter (opinionated, like prettier)

selene Linter (30+ checks)

lua-language-server Type checking via LuaCATS annotations

Neovim's own .stylua.toml :

column_width = 100 indent_type = "Spaces" indent_width = 2 quote_style = "AutoPreferSingle"

Key Principles

From nvim-best-practices (parts upstreamed to :h lua-plugin ):

  • No forced setup() : Plugins should work out of the box. Separate configuration from initialization.

  • <Plug> mappings: Let users define their own keymaps instead of hardcoding bindings.

  • Subcommands over pollution: Use :Rocks install not :RocksInstall , :RocksPrune , etc.

  • Defer require() : Don't load everything at startup. Require inside command implementations.

  • LuaCATS annotations: Use type hints; catch bugs in CI with lua-language-server.

  • Busted over plenary.nvim: For testing. More powerful, standard in broader Lua community.

  • SemVer: Version your plugins properly. Publish to luarocks.org.

  • Health checks: Provide lua/{plugin}/health.lua for :checkhealth .

Style Conventions

  • Indent: 2 spaces (not tabs)

  • Quotes: Single quotes preferred

  • Line width: 100 columns

  • Naming: snake_case for functions and variables, PascalCase for classes/modules

  • No semicolons: They're unnecessary in Lua

  • Trailing commas: In multi-line tables for cleaner diffs

  • Comments: Explain why, not what

Plugin Structure

plugin-name/ ├── lua/ │ └── plugin-name/ │ ├── init.lua # Entry point, setup function │ ├── health.lua # :checkhealth integration │ └── *.lua # Module files ├── plugin/ │ └── plugin-name.lua # Auto-loaded, defines commands/autocommands ├── doc/ │ └── plugin-name.txt # Vimdoc for :h plugin-name └── tests/ └── *_spec.lua # Busted test files

References

For detailed guidance with code examples, see references/nvim-best-practices.md .

External sources:

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

neo

Browse websites, read web pages, interact with web apps, call website APIs, and automate web tasks. Use Neo when: user asks to check a website, read a web page, post on social media (Twitter/X), interact with any web app, look up information on a specific site, scrape data from websites, automate browser tasks, or when you need to call any website's API. Keywords: website, web page, browse, URL, http, API, twitter, tweet, post, scrape, web app, open site, check site, read page, social media, online service.

Archived SourceRecently Updated
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated