-
Notifications
You must be signed in to change notification settings - Fork 0
Telescope magic picker
Federico Mengozzi edited this page Mar 8, 2026
·
3 revisions
This document describes the custom magic picker implemented in
fnl/mods/tools/telescope.fnl.
- Normal mode:
-
<C-f>-> full-height magic picker (themed_magic) -
F-> magic picker with count-based height- default
F= 40% -
3F= 30%,7F= 70%,9F= 90%
- default
-
- Grep shortcuts:
-
fs(normal) -> grep current word -
fs(visual) -> grep selected text
-
The magic picker combines file finding and live grep in one picker and lets you change context without closing it.
- Starts in
filesmode by default - Root starts at current buffer directory (
utils.buffer_dir()) - Search depth starts at
4 - Uses a dynamic previewer:
- text/code files -> Telescope file preview
- media files (
png,jpg,gif,mp4,webm,pdf,epub, ...) -> terminal preview script
Prompt title is updated live:
<mode> [d:<depth>] [h:<on|off>] <cwd>
Example:
find [d:4] [h:off] $HOME/projects/myrepo
-
S(normal mode): decrease depth (fcmd_depth - 1, minimum1) -
D(normal mode): increase depth (fcmd_depth + 1) -
<C-h>(insert/normal): toggle hidden files -
<C-g>(insert/normal): toggle modefiles <-> grep -
<C-e>(insert/normal):cdinto first directory segment from selected entry -
<Tab>(insert/normal):cdinto full directory of selected entry -
<S-Tab>(insert/normal): go to parent directory
All of these refresh the current picker in place.
-
filesmode:- command:
fd --type f --color never --follow --max-results 5000 --max-depth <d> [--hidden]
- command:
-
grepmode:- command base:
rg --color=never --no-heading --with-filename --line-number --column --smart-case --max-depth <d> [--hidden] - query is passed dynamically as you type
- command base:
- In grep mode, selected entry paths come from
entry.filenamewhen available. - Directory jumps only happen when target is an existing directory and differs from current cwd.
- Picker cache is disabled (
cache_picker = false) so refresh always reflects current state.