Skip to main content

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

KeyActionScope
<leader><space>Find FilesRoot dir
<leader>ffFind FilesRoot dir
<leader>fFFind Filescwd
<leader>fgFind Files (git)Git tracked
<leader>/GrepRoot dir
<leader>sGGrepcwd
<leader>,BuffersOpen buffers
<leader>eExplorerRoot dir
<leader>EExplorercwd
<leader>frRecent filesGlobal
<leader>fpProjectsRecent projects
<leader>:Command historyGlobal

Root Dir vs cwd

LazyVim detects the root directory using vim.g.root_spec:

Default root detection
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }

It checks (in order):

  1. If LSP is attached, use LSP root
  2. Look for .git or lua directory
  3. 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:

  1. Press <leader>ff
  2. Start typing a filename fragment
  3. The list filters in real-time
  4. <CR> opens the file
  5. <C-v> opens in vertical split
  6. <C-x> opens in horizontal split
  7. <C-t> opens in new tab

Live Grep (Search File Contents)

<leader>/ ← grep in root dir
<leader>sG ← grep in cwd

Workflow:

  1. Press <leader>/
  2. Type a search pattern (regex or plain text)
  3. Results update live as you type
  4. <CR> opens the file at the match line
  5. <C-q> sends all results to quickfix list

Search Tips

TipWhat 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

KeyOpens
<leader>sdDiagnostics (all buffers)
<leader>sDDiagnostics (current buffer)
<leader>sbLines in current buffer
<leader>sBGrep across open buffers
<leader>scCommand history
<leader>sCCommands palette
<leader>shHelp pages
<leader>sHHighlight groups
<leader>siIcons
<leader>smMarks
<leader>sMMan pages
<leader>spPlugin specs
<leader>sqQuickfix list
<leader>slLocation list
<leader>suUndo tree
<leader>s/Search history

Picker Window Controls

KeyAction
<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> / qClose 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)

KeyAction
j / kNavigate up/down
l / <CR>Expand directory / open file
hCollapse / go to parent
/Filter visible files
EscClear filter
aAdd file (trailing / for directory)
dDelete (with confirmation)
rRename
yCopy filename
YCopy absolute path
cCopy file
mMove file
RRefresh
HToggle hidden files
?Show all keymaps
qClose 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:

lua/plugins/extras.lua
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

AspectSnacks PickerTelescope
SpeedFasterSlightly slower
ExtensionsBuilt-inCommunity extensions
UIMinimalFeature-rich previews
Default in LazyVimYesNo (opt-in via extra)

Switching to fzf-lua

lua/plugins/extras.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:

lua/plugins/extras.lua
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

lua/plugins/extras.lua
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