This plugin is whole re-write of 42header in Lua.
- Command:
Stdheader
- Customizable options
- Modulate
- Auto update on save (optional)
- Support many file types by default
use { "Diogo-ss/42-header.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
}
call plug#begin()
Plug 'Diogo-ss/42-header.nvim'
call plug#end()
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
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
Lua version by Diogo-ss
Original VimScript version:
zazard - creator
alexandregv - contributor
mjacq42 - contributor
sungmcho - contributor