fix(yazi): previewer match field name -> url (yazi 26.x)

yazi 26.x renamed the previewer/fetcher match key from name to url. The
fetchers were updated but the markdown previewer still used name, so the
whole [plugin] config failed to parse ("at least one of 'url' or 'mime'
must be specified") and yazi fell back to its presets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-14 12:11:20 +01:00
parent 66f58fa228
commit d9301ad954

View File

@@ -56,8 +56,12 @@ in
# Route only audio + subtitles to mediainfo's text metadata;
# images/videos keep yazi's native visual thumbnails. Markdown
# renders through glow.
# Match field is `url` (a path glob) or `mime` — yazi 26.x renamed
# the old `name` to `url`, same as the fetchers above. Using `name`
# fails the parse ("at least one of 'url' or 'mime'") and yazi falls
# back to its presets.
prepend_previewers = [
{ name = "*.md"; run = "glow"; }
{ url = "*.md"; run = "glow"; }
{ mime = "audio/*"; run = "mediainfo"; }
{ mime = "application/subrip"; run = "mediainfo"; }
];