Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tetzng/add-plugin.nvim
A Neovim plugin to easily create new Lua plugin files.
https://github.com/tetzng/add-plugin.nvim
neovim neovim-plugin
Last synced: 4 days ago
JSON representation
A Neovim plugin to easily create new Lua plugin files.
- Host: GitHub
- URL: https://github.com/tetzng/add-plugin.nvim
- Owner: tetzng
- Created: 2023-09-08T06:21:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-08T06:32:41.000Z (over 1 year ago)
- Last Synced: 2024-12-25T04:45:53.347Z (9 days ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# add-plugin.nvim
A Neovim plugin to easily create new Lua plugin files.
## Features
- Create a new Lua file with a predefined template at a specified location.
- Open the newly created file in Neovim for editing.
- Customize the root path and content of the template.## Requirements
- Neovim >= 0.9.0
## Installation
With a plugin manager like [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
"tetzng/add-plugin.nvim",
---@type AddPlugin.UserConfig
opts = {},
}
```## Usage
In Neovim, use the `:AddPlugin` command followed by the name of lua file for the plugin you want to create:
```vim
:AddPlugin your_plugin_name
```## Configuration
You can customize the behavior of `add-plugin.nvim` by providing a configuration table during setup. Here's an example:
```lua
require("add_plugin").setup({
open_on_create = false, -- optional: open the file after creating
plugin_root_path = 'your_nvim_root/plugins', -- optional: default is inferred from $MYVIMRC
content = [[
local M = {}
return M
]], -- optional: default template content
})
```