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​

&lt;leader&gt;&lt;space&gt; or &lt;leader&gt;ff

Fuzzy-find files under the project root.

&lt;leader&gt;fF

Fuzzy-find files under the current working directory.

Workflow:

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

Live Grep (Search File Contents)​

&lt;leader&gt;/ ← grep in root dir
&lt;leader&gt;sG ← grep in cwd

Workflow:

  1. Press &lt;leader&gt;/
  2. Type a search pattern (regex or plain text)
  3. Results update live as you type
  4. &lt;CR&gt; opens the file at the match line
  5. &lt;C-q&gt; 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:

&lt;leader&gt;e ← Toggle explorer (root dir)
&lt;leader&gt;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. &lt;leader&gt;e ← Open explorer
2. / ← Filter: type subdir name
3. j/k ← Navigate to file
4. &lt;CR&gt; ← Open file
5. &lt;leader&gt;e ← Close explorer
6. &lt;C-h/j/k/l&gt; ← 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 &lt;leader&gt;f* and &lt;leader&gt;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:

  • &lt;leader&gt;e — file explorer
  • &lt;leader&gt;be — buffer explorer
  • &lt;leader&gt;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

&lt;leader&gt;ff app.js ← Find file quickly
&lt;leader&gt;/ userAuth ← Search across project
&lt;leader&gt;, ← Switch to open buffer
gd ← Go to definition
&lt;C-o&gt; ← Jump back in history
&lt;C-i&gt; ← Jump forward

&lt;leader&gt;fp ← Switch to another project (recent projects)
&lt;leader&gt;fr ← Open recent file