/header.nvim

Neovim header

Primary LanguageLuaMIT LicenseMIT

🛸 42 Header

This plugin is whole re-write of 42header in Lua.

✨ Features

  • Command: Stdheader
  • Customizable options
  • Modulate
  • Auto update on save (optional)
  • Support many file types by default

🚀 Showcase

header

🎈 Setup

📦 Packer.nvim

use { "Diogo-ss/42-header.nvim" }

💤 Lazy.nvim

{ "Diogo-ss/42-header.nvim" }
return {
    "Diogo-ss/42-header.nvim",
    lazy = false,
    config = function()
        local header = require("42header")
        header.setup({
            default_map = true, -- default Mapping <F1> in normal mode
            auto_update = true,  -- update header when saving
            user = "Diogo-ss", -- your user
            mail = "contact@diogosilva.dev", -- your mail
        })
    end
}

🔌 Vim-plug

call plug#begin()
  Plug 'Diogo-ss/42-header.nvim'
call plug#end()

⚙ Options

local header = require("42header")
header.setup({
  length = 80, -- headers of different sizes are incompatible with each other
  margin = 5,
  default_map = true, -- default Mapping <F1> in normal mode
  auto_update = true, -- update header when saving
  user = "Diogo-ss", -- your user
  mail = "contact@diogosilva.dev", -- your mail
  -- asciiart = { "......", "......",} -- headers with different ascii arts are incompatible with each other
})

🌐 User and Mail

user and mail can be defined using global variables.

vim.g.user = "Diogo-ss"
vim.g.mail = "contact@diogosilva.dev"

NOTE: global variables have higher priority than setup values

🍦 Credits

Lua version by Diogo-ss

Original VimScript version:
zazard - creator
alexandregv - contributor
mjacq42 - contributor
sungmcho - contributor