You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow users to control where float-based previewers open (markdown, archive, cert, binary, font, key, sqlite) via a window config key and an optional :GlimpsePreview command argument.
Tasks
Extend :GlimpsePreview to accept optional [window] and [path] arguments, passing window directly to the previewer (no config involved yet)
Add window to global config with precedence resolution: command argument > global config > float (hard default)
Inline previewers (image, video) respect window for initial split direction (left/right); existing preview windows are always reused on their current side regardless of window value
size key (columns for right/left, lines for bottom/top)
bottom/top support for inline previewers
API
Command
:GlimpsePreview [window] [path]
[window] and [path] are both optional. When [path] is omitted, the current buffer is used. When [window] is omitted, config is consulted; if config is also absent, defaults to float.
Examples:
:GlimpsePreview" current buffer, float (default)
:GlimpsePreview right" current buffer, split to the right
:GlimpsePreview float README.md
:GlimpsePreview right README.md
:GlimpsePreview bottom README.md
Command argument > per-extension config > global config > float (hard default, preserves current behavior)
Accepted values
Value
Behavior
float
floating window (default)
right
vertical split to the right
left
vertical split to the left
bottom
horizontal split below
top
horizontal split above
Notes
nil is a valid global config value - it means "no preference, let the command decide"
size accepts either a number (applies to all positions) or a table with per-position keys (left, right, bottom, top); when absent or unset for a position, Neovim's default split size applies
auto_open always uses the global/per-extension config (no command argument in that flow)
Inline previewers (image, video):bottom/top not yet supported; horizontal split positioning requires a separate detection axis (row vs column). Deferred.
Summary
Allow users to control where float-based previewers open (markdown, archive, cert, binary, font, key, sqlite) via a
windowconfig key and an optional:GlimpsePreviewcommand argument.Tasks
:GlimpsePreviewto accept optional[window]and[path]arguments, passingwindowdirectly to the previewer (no config involved yet)windowto global config with precedence resolution: command argument > global config >float(hard default)windowfor initial split direction (left/right); existing preview windows are always reused on their current side regardless ofwindowvaluepipelines[".md"] = { window = ... }), aligned with [v3] Pipeline-first architecture: delegate all conversion to external CLIs #92sizekey (columns forright/left, lines forbottom/top)bottom/topsupport for inline previewersAPI
Command
[window]and[path]are both optional. When[path]is omitted, the current buffer is used. When[window]is omitted, config is consulted; if config is also absent, defaults tofloat.Examples:
Config
Precedence
Command argument > per-extension config > global config >
float(hard default, preserves current behavior)Accepted values
floatrightleftbottomtopNotes
nilis a valid global config value - it means "no preference, let the command decide"sizeaccepts either a number (applies to all positions) or a table with per-position keys (left,right,bottom,top); when absent or unset for a position, Neovim's default split size appliesauto_openalways uses the global/per-extension config (no command argument in that flow)Known limitations
bottom/topnot yet supported; horizontal split positioning requires a separate detection axis (row vs column). Deferred.pipelines[ext].windowoverride not yet implemented; deferred to [v3] Pipeline-first architecture: delegate all conversion to external CLIs #92.sizekey: not yet implemented.