Configure a preview window
masterTo help users distinguish between items with identical text (e.g., different artists with the same track name), use the WithPreviewWindow option. This allows you to render detailed information about the item currently under the cursor in a separate pane.
// Inside Find or FindMulti options:
fuzzyfinder.WithPreviewWindow(func(i, w, h int) string {
if i == -1 {
return ""
}
// Return a formatted string representing the preview content
return fmt.Sprintf("Detail for item %d", i)
})