A Neovim plugin adding a user command which inserts filename, git repo name and author infos into comented lines on top of the current file.
- adds three commented lines on top of the current file like:
-- file: /home/cs/files/src/insgitheader.nvim/lua/insgitheader/init.lua
-- git: /home/cs/files/src/insgitheader.nvim
-- author: Christian Schult cschult@example.com 2024
- handles VCSH managed repo
- Neovim >= 0.7.0
- Git
Install the theme with your preferred package manager, such as folke/lazy.nvim:
{
'cschult/insgitheader.nvim'
lazy = false,
opts = {},
}
or
{
'cschult/insgitheader.nvim'
lazy = false,
opts = {
name = 'John Doe',
email = 'jd@example.org'
},
}
Setting name and email is optional. If unset, name and email are looked up from git config.
:InsGitHeader
I'm just learning to write a neovim plugin in lua. This is just a simple project for my personal use.