Oldfiles picker implementation#1
Open
galal-hussein wants to merge 50 commits into
Open
Conversation
* fix: LMDB stale readers and automatic compactions closes dmtrKovalenko#460 * chore: Update docs for - fix: LMDB stale readers and automatic compactions * chore: Fix CI - typos, rustfmt, stylua, lls
* chore: Remove unused rust deps * chore: Update docs for - chore: Remove unused rust deps
* perf: Improve macos indexing wall time * wip: try to get rid of arcs * chore: Update docs for - wip: try to get rid of arcs * chore: expanad fuzzy test suite * fix ci * fix: Parallelize git & indexing
* feat: add wrap_around option for cursor navigation When enabled (wrap_around = true), the cursor wraps to the opposite end when reaching the first or last item in the results list, instead of stopping at the boundary. This applies to: - move_up/move_down in insert mode (C-k/C-j, Up/Down, Tab/S-Tab, etc.) - j/k navigation in normal mode (list buffer) - Both top and bottom prompt positions The option defaults to false to preserve existing behavior. Pagination still takes priority: wrapping only occurs when there are no more pages to load in the current direction. * fix: wrap_around takes priority over pagination When wrap_around is enabled, cursor wraps within the current page instead of loading the next/previous page. This gives the expected cycling behavior where Tab at the top jumps to the bottom and S-Tab at the bottom jumps to the top. * fix: wrap only at global boundaries, paginate on intermediate pages Pagination now takes priority over wrap_around on non-boundary pages. Wrapping only occurs at the true global edges: - First item on first page → wraps to last item on last page - Last item on last page → wraps to first item on first page On all other page boundaries, normal pagination continues as expected. * fix: stylua formatting and remove wrap_around from FffKeymapsConfig type - Collapse multi-line callbacks to single-line (stylua) - Remove wrap_around from FffKeymapsConfig type annotation (belongs only on FffConfig)
…rKovalenko#483) * fix: Panic in query parsing if query contains wrong bracket expr fixes dmtrKovalenko#479 * chore: Update docs for - fix: Panic in query parsing if query contains wrong bracket expr
Co-authored-by: gustav-fff <66k7bxj9m6@privaterelay.appleid.com> Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…o#489) * feat(neovim): New 'start' shortening strategy for paths * chore: Update docs for - feat(neovim): New 'start' shortening strategy for paths
This reverts commit ffb39a8.
* fix(neovim): Improve borders and default flex layout * chore: Update docs for - fix(neovim): Improve borders and default flex layout * fix(ci): Use gustav pat * fix(lua): Resolve type check warnings Annotate state shape and inject-field warnings flagged by lua-language-server.
Expose follow_symlinks configuration option for following symbolic links during file indexing. - Add follow_symlinks field to FilePickerOptions (default false) - Thread option through FilePicker, ScanConfig, walk_filesystem - Add lua config: vim.g.fff.follow_symlinks (default false) - Pass config from lua -> rust FFI init_file_picker Root cause: WalkBuilder.follow_links() hardcoded to false at file_picker.rs:1738 Refs dmtrKovalenko#375 Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…nko#518) calculate_layout_dimensions uses math.max(0, ...) for list/preview heights and widths, which can yield 0 when the terminal is small and flex wraps preview to top/bottom. nvim_open_win requires positive integers, so it rejected the call with "Invalid 'height'". Clamp width/height to >=1 at the final boundary before nvim_open_win in build_window_configs for list, input, preview, and file_info. Closes dmtrKovalenko#518
Also a bit refactors the layout code
* feat(lua): Add programmatic api for lua * fix(lua): Resolve CI lint errors - main.lua: drop duplicate `open_file_under_cursor` impl, superseded by the path-resolving variant - picker_ui.lua: replace undefined `canonicalize_fff_path` with `utils.canonicalize_picker_path` - programmatic_search_spec.lua: cast `hit` to non-nil after the `assert.is_not_nil` so lua-ls stops flagging the follow-up field accesses
…o#511) Adds optional `hl.winhl` config that controls the picker windows' `winhighlight`. Accepts either a single string applied to all picker windows, or a table with optional `prompt`, `list`, `preview`, and `file_info` keys. Missing keys fall back to the default composed from `hl.normal`, `hl.border`, and `hl.title`. Refs dmtrKovalenko#140 Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…enko#388) (dmtrKovalenko#505) Refs dmtrKovalenko#388 Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…valenko#476) (dmtrKovalenko#499) Refs dmtrKovalenko#476 Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…Kovalenko#451) (dmtrKovalenko#502) Refs dmtrKovalenko#451 When both enable_mmap_cache and enable_content_indexing are false, run_post_scan never executes (guarded by config.warmup || config.content_indexing). This left bigram_index as None, so get_scan_progress().is_warmup_complete returned false forever. Added warmup_complete flag to ScanSignals. Set immediately after post-scan finishes OR right after walking completes when no post-scan work needed. get_scan_progress now reads warmup_complete instead of checking bigram_index presence. Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
closes dmtrKovalenko#524 Originally we used to scan first 512 bytes which is not enough, here I am adding more files for initial extension triage, making it possible to unmark file as binary and making binary scanning more coherent which should support 99.9999999999% cases not breaking performance really hard
…ko#538) (dmtrKovalenko#539) * fix: defer file open past picker close to preserve folds (dmtrKovalenko#538) closes dmtrKovalenko#538 * test: flush schedule in picker_dir_resolution after select('edit') (dmtrKovalenko#538) --------- Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
* feat: Optimize repeatable greps for large files * fix: gate get_cached_content for windows and fix typo - Wrap unix get_cached_content in cfg(not(target_os = windows)) so it doesn't reference field absent on windows builds. - Fix imperically -> empirically (typos CI). - cargo fmt. * fix: silence unused mmap_slot warning on windows * fix: per-OS FRESH_MMAP_THRESHOLD (macOS 1MiB, Linux 256KiB, Windows 0) * fix: silence dead_code for FRESH_MMAP_THRESHOLD on windows Value is 0 and unused (mmap path is gated off on windows), but -D warnings + -D dead-code in CI fails the build. --------- Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
…block(dmtrKovalenko#551) (dmtrKovalenko#553) ValidateSet validates the parameter at bind time, before the script body executes. With no default in the param block, an unbound $PathScope is the empty string and fails validation under irm ... | iex. Move the env-var fallback into the param default so the value is already valid when ValidateSet runs. Closes dmtrKovalenko#551 Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
…valenko#554) Closes dmtrKovalenko#549 Adds grep.location_format option (vim printf-style) controlling the line/column prefix rendered before each grep match. Defaults to ':%d:%d' to preserve current behavior. Set to ':%d' for line-only. Falls back to default if user format errors at runtime. Co-authored-by: Dmitriy Kovalneko<dmitriy@iusevimbtw.com>
* left click to select rows in picker single click moves the cursor to the clicked row (updating preview and status) double click opens the file with the default action * stylua
Pkl (pkl-lang.org) is a configuration language with .pkl files. Was classified as binary alongside Python pickle (.pickle). Remove both — pkl is plain text; legacy pickle is rare and harmless to preview. Closes dmtrKovalenko#550 Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
closes dmtrKovalenko#546 Removes all the heuristics across all the binary size detection, now we scan every single byte up to content searchable cap of fff to detct if the file is not a text + some fff lua size guard
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
…Kovalenko#556) * fix(preview): keep cursor on match when paging with <C-d>/<C-u> preview.scroll moved the cursor to the new topline, which dragged the location highlight / cursorline away from the matched line. Page the viewport with winrestview({topline=...}) instead so cursor stays parked on the match. Refs dmtrKovalenko#555 * fix: Properly address the issue --------- Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com> Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
b042d93 to
e3a4328
Compare
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Owner
|
Thanks @galal-hussein. It might take me a day or two to go through this as I am very occupied at work. |
Author
|
No worries at all, take your time, thanks! |
c42753a to
a8d6dec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simple oldfiles implementation, that reuses the fff plugin's UI picker