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:
parent
6e48c6716b
commit
50580ecde5
3 changed files with 8 additions and 80 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue