refactor: remove PreviewWatch* events and clean up docs

Problem: PreviewWatchStarted/PreviewWatchStopped were redundant with
the status() API, and the doc had a wrong author, stale INSTALLATION
format, and "watch mode" language left over from the watch → toggle
rename.

Solution: Remove the events and their tests. Fix the doc author,
rename INSTALLATION → SETUP to match sibling plugins, replace "watch
mode" with "auto-compile" throughout, and drop the events from EVENTS.
This commit is contained in:
Barrett Ruth 2026-03-03 00:44:46 -05:00
parent 6e48c6716b
commit 50580ecde5
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 8 additions and 80 deletions

View file

@ -188,11 +188,6 @@ function M.toggle(bufnr, name, provider, ctx_builder)
end,
})
vim.api.nvim_exec_autocmds('User', {
pattern = 'PreviewWatchStarted',
data = { bufnr = bufnr, provider = name },
})
M.compile(bufnr, name, provider, ctx_builder(bufnr))
end
@ -205,11 +200,6 @@ function M.unwatch(bufnr)
vim.api.nvim_del_autocmd(au_id)
watching[bufnr] = nil
log.dbg('unwatched buffer %d', bufnr)
vim.api.nvim_exec_autocmds('User', {
pattern = 'PreviewWatchStopped',
data = { bufnr = bufnr },
})
end
---@param bufnr integer