Problem: the `markdown` and `github` presets write `.html` output to the
working directory, which clutters the project.
Solution: add a FAQ entry to both `README.md` and `doc/preview.txt`
showing how to override the `output` field to redirect to `/tmp`.
* feat(compiler): add compile start/complete notifications
Problem: No user-facing feedback when compilation starts or finishes.
Long-running compilers like pandoc with `--embed-resources` leave the
user staring at nothing for 15+ seconds.
Solution: Notify "compiling..." at compile start and "compilation
complete" on success. The initial `toggle` call uses a combined
"compiling with <name>..." message to avoid stacking two notifications.
* refactor(presets): use `--katex` instead of `--embed-resources --mathml`
Problem: `--embed-resources` with `--mathml` caused pandoc to inline all
assets at compile time, adding ~15s per save for KaTeX-heavy documents.
Solution: Default to `--katex`, which inserts a CDN `<script>` tag and
defers rendering to the browser. Users can opt into `--embed-resources`
or `--mathml` via `extra_args`.
* docs(presets): rewrite math rendering section for `--katex` default
* refactor(compiler): simplify notification flow, add failure notify
Problem: `compile()` used an `opts.silent` escape hatch so `toggle()`
could suppress duplicate notifications. Compilation failures had no
user-facing notification.
Solution: Remove `opts.silent` — `compile()` unconditionally notifies
on start, success, and failure. `toggle()` no longer emits its own
message.
* feat(compiler): add per-recompile notifications for long-running providers
Problem: long-running providers like `typst watch` had no per-recompile
feedback — the process stays alive and individual success/failure was
never reported.
Solution: add a persistent `output_watcher` fs_event that fires
"compilation complete" on every output mtime bump, and track
`has_errors` on `BufState` so stderr diagnostics trigger a one-shot
"compilation failed" notification. `diagnostic.set()` now returns the
diagnostic count to support this flow.
* ci: format
* chore: remove testing files
* fix(presets): add `--mathml` to `markdown` and `github` pandoc args
Problem: pandoc's default HTML math renderer cannot handle most TeX and
dumps raw LaTeX source into the output. `--mathjax` and `--katex` are
incompatible with `--embed-resources` because pandoc cannot inline
dynamically-loaded JavaScript modules and fonts.
Solution: add `--mathml` to both `markdown` and `github` preset args.
MathML is rendered natively by all modern browsers with no external
dependencies, making it the only math option compatible with
self-contained HTML output.
* docs(presets): add math rendering section with KaTeX recipe
Problem: the `markdown` and `github` presets now default to `--mathml`
but users may want KaTeX or MathJax rendering instead, and the
incompatibility with `--embed-resources` is non-obvious.
Solution: add a `preview-math` section to the presets docs explaining
the default, why `--katex`/`--mathjax` require dropping
`--embed-resources`, and a concrete recipe for KaTeX with `github`.
* test(presets): update `markdown` and `github` args assertions for `--mathml`
* doc: cleanup
* chore: remove debug files
* fix(presets): add `--mathml` to `markdown` and `github` pandoc args
Problem: pandoc's default HTML math renderer cannot handle most TeX and
dumps raw LaTeX source into the output. `--mathjax` and `--katex` are
incompatible with `--embed-resources` because pandoc cannot inline
dynamically-loaded JavaScript modules and fonts.
Solution: add `--mathml` to both `markdown` and `github` preset args.
MathML is rendered natively by all modern browsers with no external
dependencies, making it the only math option compatible with
self-contained HTML output.
* docs(presets): add math rendering section with KaTeX recipe
Problem: the `markdown` and `github` presets now default to `--mathml`
but users may want KaTeX or MathJax rendering instead, and the
incompatibility with `--embed-resources` is non-obvious.
Solution: add a `preview-math` section to the presets docs explaining
the default, why `--katex`/`--mathjax` require dropping
`--embed-resources`, and a concrete recipe for KaTeX with `github`.
* test(presets): update `markdown` and `github` args assertions for `--mathml`
* docs: add SyncTeX section with viewer recipes
Problem: SyncTeX setup for forward/inverse search was undocumented,
forcing users to figure out viewer-specific CLI flags on their own.
Solution: Add `preview-synctex` vimdoc section with shared setup and
per-viewer recipes for Zathura, Sioyek, and Okular. Add FAQ entry
in README pointing to the new section.
* build: add `zathura` and `sioyek` to nix dev shell
* docs: fix Okular inverse search instructions
Problem: Okular settings path was incomplete and didn't mention the
trigger keybinding.
Solution: Update to full path (Settings -> Configure Okular -> Editor)
and note that Shift+click triggers inverse search.
* feat: add `extra_args` provider field
Problem: Overriding a single flag (e.g. `-outdir=build`) required
redefining the entire `args` function, duplicating all preset defaults.
Solution: Add `extra_args` field that appends to the resolved `args`
after evaluation. Accepts a static table or a context function.
* docs: document `extra_args` provider field
Problem: the README and vimdoc presets list omitted `plantuml` and
`mermaid` after both were added.
Solution: add both presets to the vimdoc table and the README features
blurb.
Problem: The vimdoc used `preview.nvim.txt` filename and
`*preview.nvim-xyz*` tags, inconsistent with other plugins.
Solution: Rename to `preview.txt`, normalize tags to `*preview-xyz*`,
add contents/install sections, and use `{field} (type)` formatting.