Commit e02416b
committed
feat: add fzf-lua file preview and line navigation support
Add builtin previewer support to fzf-lua picker backend with automatic
line/column positioning for code references.
Changes:
- Enable 'builtin' previewer when preview='file'
- Append file:line:col: format to entries for fzf-lua parsing
- Update fn_fzf_index to strip position info before matching
- Supports navigation to specific lines (range highlighting shows start line only)
Implementation details:
- Uses tab separator between display text and file position
- fzf-lua's entry_to_file() automatically parses path:line:col: format
- Cursorline highlights the target line in preview
- Gracefully degrades when preview is disabled
Comparison with other pickers:
- Telescope: Full range highlighting (start-end lines)
- Snacks: Full range highlighting (start-end lines)
- fzf-lua: Single line highlighting (cursorline at start)
- Mini.pick: No file preview support1 parent 7fdcf41 commit e02416b
1 file changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
212 | 214 | | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | | - | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
| |||
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
226 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
227 | 255 | | |
228 | 256 | | |
229 | 257 | | |
| |||
0 commit comments