Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylf/gitignore.nvim
A neovim plugin for generating .gitignore files.
https://github.com/dylf/gitignore.nvim
gitignore gitignore-generator neovim nvim nvim-plugin
Last synced: about 17 hours ago
JSON representation
A neovim plugin for generating .gitignore files.
- Host: GitHub
- URL: https://github.com/dylf/gitignore.nvim
- Owner: dylf
- License: mit
- Created: 2023-08-03T03:55:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-03T04:02:10.000Z (over 1 year ago)
- Last Synced: 2023-08-03T05:22:34.890Z (over 1 year ago)
- Topics: gitignore, gitignore-generator, neovim, nvim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitignore.nvim
A neovim plugin for generating .gitignore files.
## Installation
### Lazy
```lua
return {
"dylf/gitignore.nvim",
opts = {},
}
```## Options
By default this plugin will fetch the gitignore templates from toptal.com.
If you would like to use a different source, you can configure a different
source.(Note: This plugin currently only supports one source)
```lua
require("gitignore").setup({
sources = {
{
-- return a list of template names
get_template_list = function()
local res = vim.fn.system("curl -s https://www.toptal.com/developers/gitignore/api/list")
res = res.format("%s", res)
res = res:gsub("\n", ",")
return vim.split(res, ",")
end,
-- retrieve the template content to be written to .gitignore
get_template_content = function(name)
local res = vim.fn.system("curl -s https://www.toptal.com/developers/gitignore/api/" .. name)
return res
end,
},
},
}
```