Picker, Explorer & Project Workflow
LazyVim uses Snacks.nvim for both the picker (fuzzy finding) and the explorer (file tree). You can swap either out via extras.
Quick Reference
| Key | Action | Scope |
|---|---|---|
<leader><space> | Find Files | Root dir |
<leader>ff | Find Files | Root dir |
<leader>fF | Find Files | cwd |
<leader>fg | Find Files (git) | Git tracked |
<leader>/ | Grep | Root dir |
<leader>sG | Grep | cwd |
<leader>, | Buffers | Open buffers |
<leader>e | Explorer | Root dir |
<leader>E | Explorer | cwd |
<leader>fr | Recent files | Global |
<leader>fp | Projects | Recent projects |
<leader>: | Command history | Global |
Root Dir vs cwd
LazyVim detects the root directory using vim.g.root_spec:
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
It checks (in order):
- If LSP is attached, use LSP root
- Look for
.gitorluadirectory - Fall back to current working directory (
cwd)
Impact: Commands scoped to "Root Dir" operate on your project root. Commands scoped to "cwd" operate on whatever directory you launched nvim from.
Snacks Picker (Default)
Snacks Picker replaces Telescope by default in LazyVim. It is faster and more tightly integrated.
Find Files
<leader><space> or <leader>ff
Fuzzy-find files under the project root.
<leader>fF
Fuzzy-find files under the current working directory.
Workflow:
- Press
<leader>ff - Start typing a filename fragment
- The list filters in real-time
<CR>opens the file<C-v>opens in vertical split<C-x>opens in horizontal split<C-t>opens in new tab
Live Grep (Search File Contents)
<leader>/ ← grep in root dir
<leader>sG ← grep in cwd
Workflow:
- Press
<leader>/ - Type a search pattern (regex or plain text)
- Results update live as you type
<CR>opens the file at the match line<C-q>sends all results to quickfix list
Search Tips
| Tip | What to type |
|---|---|
| Find file by name | <leader>ff partialname |
| Search file contents | <leader>/ search term |
| Find word under cursor | <leader>sw |
| Find open buffers | <leader>, |
| Find recent files | <leader>fr |
| Find recent files in cwd | <leader>fR |
| Find a command to run | <leader>: + ` |
| Find a keymap | <leader>sk |
| Find help topic | <leader>sh |
| Search registers | <leader>s" |
| Search marks | <leader>sm |
| Search jumps | <leader>sj |
| Resume last search | <leader>sR |
Advanced Picker Modes
| Key | Opens |
|---|---|
<leader>sd | Diagnostics (all buffers) |
<leader>sD | Diagnostics (current buffer) |
<leader>sb | Lines in current buffer |
<leader>sB | Grep across open buffers |
<leader>sc | Command history |
<leader>sC | Commands palette |
<leader>sh | Help pages |
<leader>sH | Highlight groups |
<leader>si | Icons |
<leader>sm | Marks |
<leader>sM | Man pages |
<leader>sp | Plugin specs |
<leader>sq | Quickfix list |
<leader>sl | Location list |
<leader>su | Undo tree |
<leader>s/ | Search history |
Picker Window Controls
| Key | Action |
|---|---|
<C-j> / <C-k> | Navigate up/down |
<C-u> / <C-d> | Scroll preview up/down |
<CR> | Open selected |
<C-v> | Open in vertical split |
<C-x> | Open in horizontal split |
<C-t> | Open in new tab |
<C-q> | Send to quickfix list |
<Tab> | Toggle multi-select |
<Esc> / q | Close picker |
Snacks Explorer (Default)
The file explorer opens in a sidebar. Keyboard-only navigation:
<leader>e ← Toggle explorer (root dir)
<leader>E ← Toggle explorer (cwd)
Explorer Keymaps (Keyboard)
| Key | Action |
|---|---|
j / k | Navigate up/down |
l / <CR> | Expand directory / open file |
h | Collapse / go to parent |
/ | Filter visible files |
Esc | Clear filter |
a | Add file (trailing / for directory) |
d | Delete (with confirmation) |
r | Rename |
y | Copy filename |
Y | Copy absolute path |
c | Copy file |
m | Move file |
R | Refresh |
H | Toggle hidden files |
? | Show all keymaps |
q | Close explorer |
Project Workflow with Explorer
1. <leader>e ← Open explorer
2. / ← Filter: type subdir name
3. j/k ← Navigate to file
4. <CR> ← Open file
5. <leader>e ← Close explorer
6. <C-h/j/k/l> ← Navigate between splits
Switching to Telescope
If you prefer Telescope over Snacks Picker:
return {
{ import = "lazyvim.plugins.extras.editor.telescope" },
}
This replaces all <leader>f* and <leader>s* pickers with Telescope equivalents. All keymaps remain the same.
Telescope vs Snacks Picker
| Aspect | Snacks Picker | Telescope |
|---|---|---|
| Speed | Faster | Slightly slower |
| Extensions | Built-in | Community extensions |
| UI | Minimal | Feature-rich previews |
| Default in LazyVim | Yes | No (opt-in via extra) |
Switching to fzf-lua
return {
{ import = "lazyvim.plugins.extras.editor.fzf" },
}
Requires fzf and ripgrep installed on your system.
Switching to Neo-tree
If you prefer Neo-tree over Snacks Explorer:
return {
{ import = "lazyvim.plugins.extras.editor.neo-tree" },
}
Neo-tree provides additional views:
<leader>e— file explorer<leader>be— buffer explorer<leader>ge— git status explorer
Switching to mini.files
return {
{ import = "lazyvim.plugins.extras.editor.mini-files" },
}
A minimal, keyboard-friendly file explorer built on mini.nvim.
Daily Project Navigation Flow
Opening a project:
nvim . ← Open in project directory
<leader>ff app.js ← Find file quickly
<leader>/ userAuth ← Search across project
<leader>, ← Switch to open buffer
gd ← Go to definition
<C-o> ← Jump back in history
<C-i> ← Jump forward
<leader>fp ← Switch to another project (recent projects)
<leader>fr ← Open recent file