The idea came from wanting a few metadata lines at the top of files, without having a plugin own the entire header block or enforce a specific template across languages. With `headup.nvim` you describe what a single header line looks like, and the plugin only updates the value you care about.
It’s driven by Lua patterns and file globs: you define a header line, choose a content type (built-ins include current_time, file_size, line_count, file_name, file_path, etc.), and `headup.nvim` replaces only the matched value while leaving the rest of the line as-is. That keeps comments, spacing, and any surrounding text under your control.
The plugin aims to stay out of the way: it respects manual edits, supports per-filetype rules with early-stop scanning and exclusions, and exposes `:HeadupUpdate` / `:HeadupToggle` commands when you want manual control instead of on-save automation. If you don’t configure anything special, it just runs on save for the patterns you set up.
There is also a small API for registering custom generators when the built-ins aren’t enough – for example, computing a git branch name, a SHA256 over the current buffer, or other derived values you want to surface in a header line. I’m particularly curious how people might use this for project-specific metadata or workflows I haven’t thought about yet.