Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.11 KB

README.md

File metadata and controls

63 lines (44 loc) · 1.11 KB

InsGitHeader

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.

Features

  • 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

Requirements

  • Neovim >= 0.7.0
  • Git

Installation

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.

Usage

:InsGitHeader

Note

I'm just learning to write a neovim plugin in lua. This is just a simple project for my personal use.