PR #580 made nightlies publish to a single rolling `nightly` release and set
`release_tag` to `nightly` for downloads. A pinned or stale install then resolved
to `nightly` and fetched whatever binary HEAD currently pointed at — an ABI
mismatch against its own Lua/FFI layer.
Restore per-sha download: `release_tag` is the unique `version` again, so each
commit's binaries live in their own permanent release. CI still force-moves the
`nightly` tag to HEAD for "give me latest" tooling, gated on `is_release` instead
of the now-per-sha `release_tag`. `current_release_tag` prefers the per-sha tag
over the `nightly` alias when both point at HEAD.
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
* refactor(picker_ui): split monolithic picker_ui.lua into focused submodules
Break the ~2535-line picker_ui.lua into 8 modules under lua/fff/picker_ui/:
- state_manager.lua: pure data store for all picker state
- ui_creator.lua: buffers, windows, keymaps, autocmds
- search_manager.lua: search execution, pagination, query history
- renderer.lua: list rendering, combo separator, scrollbar, empty state
- preview_manager.lua: preview debounce, title, update/clear
- navigation.lua: cursor movement, pagination wrap, preview scrolling
- layout_manager.lua: relayout on VimResized, close/cleanup
- init.lua: coordinator wiring all submodules via init(P) pattern
Move picker_ui.lua to picker_ui/init.lua for clean module resolution.
Also removes unused scrollbar import in ui_creator.lua and need-check-nil
diagnostic suppression comments in preview_manager.lua (nil was already
handled by the guard check).
* feat: rename and create utils in picker_ui
* chore: move list_renderer and combo_renderer
* feat: move grep_renderer and list_renderer
* chore: fix lint
* chore: update readme
Vectorize bigram byte normalization (AVX2 on x86_64, auto-vectorized
scalar elsewhere). Route grep through a P-core-sized, QoS-pinned rayon
pool to avoid E-core drag and VFS-lock contention on asymmetric chips.
Grow grep chunk size geometrically when the bigram prefilter is weak to
bound rayon barrier count on large unindexed candidate sets.
Finally make sure that we have one SINGLE api for both of the SDKs
(there were minor differences) and expose a single interface for both of
them + make better readme
* feat(sdk): Expose `glob` public api
also allow to configure the abillity to run fff in the home dir or file
sytsem root
* fix(ci): clippy lints + missing test-c-api Make target
- constraints.rs: drop redundant deref, fix GlobPattern type alias for non-zlob build
- file_picker.rs: use vec! macro for single-element ConstraintVec init (clippy)
- Makefile: add test-c-api alias to test-c-smoke for external-tests workflow
- glob-bench.ts: pageSize=100 (realistic, avoids JS marshaling overhead)
* 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 #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>
closes https://github.com/dmtrKovalenko/fff/issues/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
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#550
Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.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
Closes#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>
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#551
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>
* fix: defer file open past picker close to preserve folds (#538)
closes#538
* test: flush schedule in picker_dir_resolution after select('edit') (#538)
---------
Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
closes https://github.com/dmtrKovalenko/fff/issues/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
Refs #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>
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 #140
Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
* 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
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#518
* 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.