Files
tiny-checktime.nvim/README.md
T
swaits b5ba48b296
CI / lint (push) Canceled after 0s
CI / test (push) Canceled after 0s
chore: repoint remaining links at git.swaits.com
Rewrites lingering github.com / *.sr.ht references to this Gitea instance,
translating GitHub and Sourcehut URL shapes to Gitea's (/blob/<ref>/ and
sr.ht /tree/<ref>/item/ -> /src/branch/<ref>/, /tree/<tag> -> /src/tag/<tag>,
/actions/workflows/X -> /actions?workflow=X, /edit/ -> /_edit/).

Left pointing at the old hosts on purpose: pull-request links (PRs were not
migrated), forks that were never migrated, and GitHub-only surfaces Gitea
lacks. OpenPGP identity proofs are untouched by design.
2026-08-31 18:32:26 -06:00

981 B

tiny-checktime.nvim

A tiny plugin for Neovim 0.12+ that checks for externally modified files when focus returns.

Zero config. ~12 lines of Lua.

Features

  • Runs :checktime on focus gain and terminal events
  • Pairs with autoread to auto-reload changed files
  • Configurable trigger events
  • Works out of the box — no setup call required

Requirements

  • Neovim >= 0.12

Installation

Add to your vim.pack.add() call:

"https://git.swaits.com/swaits/tiny-checktime.nvim",

Configuration

All options are optional. Call setup() only if you want to customize:

require("tiny-checktime").setup({
  events = { "FocusGained", "TermClose", "TermLeave" },
})

How it works

When Neovim regains focus (switching back from another app or terminal pane), it runs :checktime to ask Neovim to check if any buffers were modified on disk. Combined with vim.opt.autoread = true, changed files reload automatically.

License

MIT