feat(api): let custom providers define failure summaries #82
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/preview.nvim#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #70.
Problem
preview.nvimaims to be extensible, but custom providers currently have no first-class way to participate in failure-summary UX. They can control compilation, output paths, diagnostics, quickfix behavior, cleaning, and reload/open behavior, but not the short message users see on failure.Today the only escape hatch is global user glue via
PreviewCompileFailed+preview.result(). That works, but it makes custom providers second-class if built-in presets gain provider-specific summaries.Direction
Add an optional provider-level hook for short failure summaries.
Conceptually, something in the shape of
failure_summary(result, ctx)would be enough.Important constraints:
error_parser; diagnostics and summaries are different concerns.stdout = true/stderr = true.nilshould fall back to the genericcompilation failedbehavior.:Preview outputandpreview.result()as the raw inspection path.This keeps the core minimal while making custom providers first-class for failure UX.
Implemented in #86.