preview.nvim/lua/preview
Barrett Ruth da3e3e4249
fix(compiler): check output exists before opening from long-running process (#24)
* fix(compiler): check output exists before opening from long-running process

Problem: for long-running processes (typst watch), M.compile() calls
the opener immediately after vim.system() returns, before the process
has produced any output. On first run the output file does not exist
yet, so the opener is called on a nonexistent path.

Solution: guard the open block with vim.uv.fs_stat so it only fires
if the output file already exists at spawn time.

* style(compiler): reformat long condition for stylua
2026-03-04 00:20:41 -05:00
..
commands.lua feat: unified reload field for live-preview (SSE + long-running watch) (#19) 2026-03-03 16:41:47 -05:00
compiler.lua fix(compiler): check output exists before opening from long-running process (#24) 2026-03-04 00:20:41 -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 feat: unified reload field for live-preview (SSE + long-running watch) (#19) 2026-03-03 16:41:47 -05:00
log.lua feat: rename 2026-03-02 21:23:40 -05:00
presets.lua feat: unified reload field for live-preview (SSE + long-running watch) (#19) 2026-03-03 16:41:47 -05:00
reload.lua fix(reload): bind SSE server to port 0 for OS-assigned port (#21) 2026-03-03 17:46:04 -05:00