https://github.com/lucastavaresa/headers.nvim
Zero-config header/footer warnings.
https://github.com/lucastavaresa/headers.nvim
lua neovim neovim-plugin nvim plugin
Last synced: 6 months ago
JSON representation
Zero-config header/footer warnings.
- Host: GitHub
- URL: https://github.com/lucastavaresa/headers.nvim
- Owner: LucasTavaresA
- License: gpl-3.0
- Created: 2024-11-27T21:24:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-05T15:35:54.000Z (about 1 year ago)
- Last Synced: 2025-01-12T04:06:02.938Z (about 1 year ago)
- Topics: lua, neovim, neovim-plugin, nvim, plugin
- Language: Lua
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# headers.nvim
Zero-config header/footer warnings.
Turn on notifications in [Breaking Changes](https://github.com/LucasTavaresA/headers.nvim/issues/1) if using this plugin.
## Contents
- [Installation](#installation)
- [Options](#options)
## Installation
[packer.nvim](https://github.com/wbthomason/packer.nvim):
```lua
use {
"lucastavaresa/headers.nvim",
config = function()
require("headers").setup()
end,
}
```
[lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
"lucastavaresa/headers.nvim",
config = function ()
require("headers").setup()
end,
}
```
## Keybindings
There is no keybindings by default.
Those are all the available functions:
```lua
-- Prepends/Appends the hovered header/footer
vim.keymap.set("n", "H", require("headers").fix_hovered)
-- Ignore warnings for the current buffer root
vim.keymap.set("n", "I", require("headers").ignore)
```
## Options
The setup function receives a table with the options, these are the default values:
```lua
{
code_paths = {}, -- {} will warn everywhere, set one or more folders to warn only in those folders
paths_file = vim.fn.stdpath("data") .. "/headers.nvim/paths.lua",
non_code = { "sh", "zsh", "bash", "fish", "vim", "markdown", "txt", "json", "yaml", "toml", "ini", "html", "css", "sql", "xml", "cmake", "make", "diff", "patch", "git", "gitcommit", "gitconfig", "gitignore", "gitattributes", },
}
```