Skip to content

beyond-fu/AutoHeader.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a modified version of 42-header.nvim plugin

✨ Features

  • Auto update on save (optional)
  • Supports commentstring
  • Supports Git
  • Supports symmetry or asymmetry comment with no redundant spaces inserted in case the formatter doesn't work.
  • Command: AutoHeader

🚀 Showcase

C file: example_c

Systemverilog file: example_sv

🎈 Setup

💤 Lazy.nvim
{
    "beyond-fu/AutoHeader.nvim",
    event = "BufRead",
    opts = {},
}

⚙ Options(default)

{
  length = 80,            -- max length for each line(including commentstring)
  margin = 5,             -- margin length(including commentstring)
  default_map = true,     -- default keymap: F4
  auto_update = true,     -- if auto-update `update_time` when saving
  user = "username",      -- default username
  mail = "your@mail.com", -- default email
  copyright = false,      -- copyright message
  company = nil,          -- company message when copyright is on, should be a string or nil
  description = false,    -- depcription message
  license = false,        -- license message
  license_type = nil,     -- license type when license is on, should be a string or nil
  --- Git support
  git = {
    enabled = false,
    bin = "git",         -- path of `git` bin
    user_global = true,  -- use global user.name, otherwise use local user.name.
    email_global = true, -- use global user.email, otherwise use local user.email.
  },
}

🌐 User and Email

user and email can also be defined using vim global variables, this is the first priority.

vim.g.user = "username"
vim.g.mail = "your@mail.com"

About

A modified version of `42-header.nvim` plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages