feat: initial release
This commit is contained in:
17 files changed
+252
No files matched your search
@@ -0,0 +1,46 @@
|
||||
# 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:
|
||||
|
||||
```lua
|
||||
"https://github.com/swaits/tiny-checktime.nvim",
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
All options are optional. Call `setup()` only if you want to customize:
|
||||
|
||||
```lua
|
||||
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](LICENSE)
|
||||
Reference in new issue
Block a user