Modern quality-of-life improvements for Neovim - A collection of small but powerful utilities that enhance your daily workflow.
Snacks.nvim is a comprehensive suite of QoL (Quality of Life) improvements for Neovim. In this configuration, we use Snacks for:
Note: Due to integration considerations, we use Telescope for file/text searching operations while leveraging Snacks for its excellent UI components and utilities.
The Snacks file explorer provides a modern, fuzzy-searchable alternative to traditional tree explorers:
A beautiful, customizable start screen that appears when you open Neovim without a file:
Seamless terminal integration within Neovim:
| Key | Action | Description |
|---|---|---|
<leader>ff |
Find Files | Fast fuzzy file search |
<leader>fF |
Find Files + Hidden | Include hidden files |
<leader>fr |
Recent Files | Quick access to recent files |
<leader>fg |
Live Grep | Search text in all files |
<leader>fG |
Live Grep + Hidden | Search including hidden files |
<leader>f/ |
Grep Word | Search word under cursor |
<leader>f; |
Resume Search | Continue last search |
<leader>fb |
Browse Buffers | Switch between open files |
<leader>fh |
Help Tags | Search Neovim help |
<leader>fc |
Commands | Browse available commands |
<leader>fk |
Keymaps | Search keybindings |
| Key | Action | Description |
|---|---|---|
<leader>. |
Toggle Scratch | Quick temporary buffer |
<leader>S |
Select Scratch | Choose from existing scratches |
| Key | Action | Description |
|---|---|---|
<leader>tt |
Toggle Terminal | Main terminal |
<leader>tf |
Float Terminal | Floating terminal |
<leader>ts |
Split Terminal | Horizontal split |
<leader>tv |
VSplit Terminal | Vertical split |
<leader>tg |
Git Terminal | git status terminal |
<leader>tp |
Python Terminal | Python REPL |
| Key | Action | Description |
|---|---|---|
<leader>e |
Explorer | Open file explorer |
<leader>E |
Explorer (file dir) | Open in current fileās directory |
<leader>o |
Open Explorer | Alternative binding |
<leader>O |
Float Explorer | Open in floating window |
- |
Open Explorer | Quick access (like vim-vinegar) |
Explorer Navigation:
| Key | Action | Description |
|---|---|---|
<leader>gg |
LazyGit | Full git interface |
<leader>gG |
LazyGit (cwd) | LazyGit from fileās directory |
<leader>gb |
Git Blame Line | Show blame for current line |
<leader>gB |
Git Browse | Open file/line in browser |
<leader>gf |
Git Files | Browse files tracked by git |
<leader>gs |
Git Status | Browse changed files |
<leader>gc |
Git Commits | Browse commit history |
<leader>gC |
Buffer Commits | Commits for current file |
LazyGit Tips:
? for help inside LazyGitTab to switch between panelsx to open command menuEnter to stage/unstage filesc to commit, P to push| Key | Action | Description |
|---|---|---|
<leader>bd |
Delete Buffer | Smart delete (keeps window layout) |
<leader>bD |
Delete All Buffers | Clear all buffers |
<leader>bo |
Delete Other Buffers | Keep only current buffer |
Smart Buffer Deletion: Unlike :bd, Snacksā buffer delete preserves your window layout and switches to a sensible buffer instead of closing the window.
| Key | Action | Description |
|---|---|---|
<leader>tw |
Toggle Wrap | Line wrapping on/off |
<leader>tS |
Toggle Spell | Spell checking on/off |
<leader>tn |
Toggle Line Numbers | Absolute line numbers |
<leader>tr |
Toggle Relative Numbers | Relative line numbers |
<leader>th |
Toggle Search Highlight | Clear search highlights |
<leader>tD |
Toggle Diagnostics | LSP diagnostics on/off |
Toggle Indicators: When you toggle a setting, a notification appears showing the new state.
| Key | Action | Description |
|---|---|---|
<leader>un |
Dismiss Notifications | Clear all notifications |
<leader>nh |
Notification History | View past notifications |
| Key | Action | Description |
|---|---|---|
<leader>z |
Toggle Zen Mode | Distraction-free coding |
<leader>Z |
Zen Zoom | Focus current window only |
<leader>sd |
Show Dashboard | Return to start screen |
Zen Mode Features:
Snacks.nvim is designed for speed and includes several performance optimizations:
.git, node_modules, __pycache__, build, distWorks seamlessly with:
You can customize Snacks.nvim behavior in ~/.config/nvim/lua/config/plugins/snacks.lua:
-- Example: Change dashboard header
dashboard = {
preset = {
header = [[
Your Custom ASCII Art Here
]],
},
}
-- Example: Modify file explorer
explorer = {
win = {
width = 40, -- Wider explorer
position = "right", -- Open on right side
},
}
<leader>fr for recent files - faster than browsing<leader>gf shows only git-tracked files, filtering out noise<leader>tg for git status, <leader>tp for Python REPL<leader>. for quick notes that wonāt clutter your workspace<leader>z when you need to focus on just the code<leader>gg gives you a full Git UI - learn it once, use everywhere<leader>gb shows who changed the current line<leader>gB opens the file on GitHub/GitLab" 1. Open Neovim - see dashboard
nvim
" 2. Press 'r' on dashboard for recent files
" 3. Or press 'f' to find files
" 4. Or press '.' to browse files
" 1. Open explorer in current directory
<leader>e
" 2. Type to filter files
config
" 3. Press Enter to open
" 4. Make edits
" 5. Delete buffer when done
<leader>bd
" 1. Check git status
<leader>gg
" 2. Stage changes (space)
" 3. Commit (c)
" 4. Push (P)
" 5. Exit (q)
" Run tests in floating terminal
<leader>tf
npm test<CR>
" Check git status quickly
<leader>tg
" Python debugging
<leader>tp
>>> import mymodule
>>> mymodule.test()
Explorer not opening: Ensure Snacks is loaded - check :Lazy for status
Dashboard not showing: Check if youāre opening a file directly - dashboard only shows when opening Neovim without arguments
Terminal issues: Make sure your shell is properly configured in your Neovim settings
Notifications piling up: Use <leader>un to dismiss all notifications
Remember: Snacks.nvim is about small quality-of-life improvements that add up to a significantly better editing experience. Take time to learn the keybindings - theyāll become muscle memory quickly!