preview.nvim/lua/preview
Barrett Ruth 6d5d84e5e8
feat(compiler): support long-running watch processes and SSE reload
Problem: compile() only supports one-shot invocations, requiring a
BufWritePost autocmd for watch mode and leaving HTML without live-
reload.

Solution: resolve_reload_cmd() maps provider.reload (function or table)
to a command; when present, compile() spawns it as a long-running
process instead of building a one-shot cmd from provider.cmd + args.
toggle() detects long-running providers and toggles the process
directly instead of registering a BufWritePost autocmd. When
reload = true and output is .html, the SSE server is invoked after
each successful compile. status() reports is_reload processes as
watching, not compiling. stop_all() also stops the SSE server.
2026-03-03 16:23:54 -05:00
..
commands.lua refactor(commands): derive completion from dispatch table (#15) 2026-03-03 15:03:48 -05:00
compiler.lua feat(compiler): support long-running watch processes and SSE reload 2026-03-03 16:23:54 -05:00
diagnostic.lua fix(presets): correct error parsers for real compiler output (#11) 2026-03-03 14:14:59 -05:00
health.lua feat: rename watch → toggle, auto-compile on start, built-in opener 2026-03-02 23:37:44 -05:00
init.lua refactor(init): replace synctex field and validation with reload 2026-03-03 16:23:47 -05:00
log.lua feat: rename 2026-03-02 21:23:40 -05:00
presets.lua refactor(presets): add reload field, remove synctex field 2026-03-03 16:23:41 -05:00
reload.lua feat(reload): add SSE live-reload server module 2026-03-03 16:23:35 -05:00