Repository navigation
fix: add layout.title_position and layout.show_file_count options (#908) - #909
Conversation
Title position was hardcoded to 'left' and the matched/total count next to the prompt could not be hidden. Defaults keep current behavior. Closes #908
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe picker layout now supports configurable title alignment and an option to hide the matched/total file count. The defaults keep the count visible and align titles to the left. Snapshot tests cover centered titles with the count hidden. ChangesPicker layout options
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The new options preserve the existing defaults, and hiding the file count does not hide indexing progress or grep-mode indicators. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ons (dmtrKovalenko#908) (dmtrKovalenko#909) Title position was hardcoded to 'left' and the matched/total count next to the prompt could not be hidden. Defaults keep current behavior. Closes dmtrKovalenko#908 Co-authored-by: Dmitriy Kovalenko <dmitriy@iusevimbtw.com>
Closes #908
Root cause
Picker title position hardcoded
title_pos = 'left'inlua/fff/layout.lua:317(bottom prompt, list window) andlua/fff/layout.lua:384(top prompt, input window). Matched/total count always rendered byupdate_statusinlua/fff/picker_ui/picker_ui.lua:389-414, no switch.Fix
layout.title_position='left'(default) |'center'|'right'. Invalid value falls back to'left'.layout.show_file_count=true(default). Whenfalse, file-mode count is skipped (also skips theget_search_metadataFFI call).Indexing files Nprogress and grep mode indicator still shown.layoutnext toshow_scrollbar, not top-level as proposed in the issue. README +doc/fff.nvim.txtupdated. Defaults unchanged.Steps to reproduce
On pre-fix
main:Expected:
FFFilescentered on top border, nothing right of the prompt.Actual (main): title glued to the left corner, file count (e.g.
32) right of the prompt. Both options silently ignored.How verified
title_center_no_count/empty_{top,bottom}(tests/screenshots/tests-picker_ui_snap.lua---title_center_no_count---*): title centered (┌──── FFFiles ────┬), no count on prompt row. Compare withdefault/empty_*:┌ FFFiles ───and32on prompt row.empty_*,no_results_*,cursor_second_item_*,scrollbarsnapshots pass unchanged, so defaults did not move.query_main_*/combo/debug_*snapshots fail locally, identically on cleanmain(c188e7a). Pre-existing drift, not touched here. CI does not run this suite.layout.computechecked headless forleft|center|right|bogus|nilxtop|bottomprompt: resolves to given value,bogus/nilfall back toleft.stylua --checkclean.Automated triage via Gustav. Honk-Honk 🪿
Summary by CodeRabbit