| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Align Telescope behavior in init.lua with the previous old_config
experience, especially around fuzzy matching and query ergonomics.
### What changed
- Telescope fzf extension config
- Added explicit extensions.fzf settings:
- fuzzy = true
- override_generic_sorter = true
- override_file_sorter = true
- case_mode = 'smart_case'
- This ensures builtin.find_files uses fzf-native sorting behavior
consistent with old config expectations.
- Robust fzf extension loading/build
- Reworked extension loading to:
- attempt telescope.load_extension('fzf')
- detect missing native artifact (build/libfzf.*) in vim.pack
install path
- auto-run make in
.../site/pack/core/opt/telescope-fzf-native.nvim when needed
- retry loading extension after successful build
- notify with a warning if build fails
- This prevents silent fallback to Telescope’s default sorter when
fzf-native is installed but not compiled.
- live_grep: space-separated AND matching
- Added helper live_grep_with_space_and(opts) and mapped:
- <leader>sg
- <leader>s/
- Multi-term input now behaves like logical AND (all terms
required), e.g.:
- foo bar matches lines containing both foo and bar in any
order.
- Implemented using:
- --pcre2 ripgrep arg
- input transform to chained lookaheads
((?=.*term1)(?=.*term2)...)
- live_grep error hardening
- Fixed regex/input edge cases that caused prompt-time errors:
- guard against nil prompt
- quote user terms safely with PCRE literal quoting (\Q...\E)
- properly escape embedded \E in user input
- This keeps AND behavior while avoiding regex parse failures for
special characters.
- vim.pack command docs cleanup
- Updated misleading top-of-file comments that referenced
non-existent commands (:PackUpdate, etc.).
- Replaced with correct vim.pack usage (:lua vim.pack.update()).
### Why
- Current config had drifted from old behavior due to fzf-native not
always being built/loaded in the new vim.pack setup.
- Users expect:
- fzf-style fuzzy filename matching (including space-separated
token behavior)
- intuitive multi-word grep that acts as AND.
- This commit restores that UX and improves resilience in fresh/new
environments.
### Files touched
- init.lua
|