17 lines
383 B
Lua
17 lines
383 B
Lua
local M = {}
|
|
|
|
function M.setup(opts)
|
|
opts = opts or {}
|
|
local events = opts.events or { "FocusGained", "TermClose", "TermLeave" }
|
|
vim.api.nvim_create_autocmd(events, {
|
|
group = vim.api.nvim_create_augroup("tiny-checktime", { clear = true }),
|
|
callback = function()
|
|
if vim.o.buftype ~= "nofile" then
|
|
vim.cmd("checktime")
|
|
end
|
|
end,
|
|
})
|
|
end
|
|
|
|
return M
|