Configs2026年7月28日·1 分钟阅读

snacks.nvim — Collection of QoL Plugins for Neovim

Bundle of small quality-of-life utilities including dashboard, notifications, terminal, picker, and more for Neovim.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 66/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
snacks.nvim Overview
先审查命令
npx -y tokrepo@latest install 6c1393f7-8a1c-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

snacks.nvim is a collection of small, focused quality-of-life plugins for Neovim bundled into a single package by folke, a prolific Neovim plugin author. Rather than installing many separate plugins, snacks.nvim provides commonly needed utilities under one roof with shared configuration patterns. The repository is folke/snacks.nvim on GitHub with approximately 7,907 stars.

What snacks.nvim Does

snacks.nvim bundles multiple independent modules that each address a common Neovim need. These include a startup dashboard, a notification system, a floating terminal, a file picker, buffer deletion helpers, word highlighting, scroll animations, indent guides, and more. Each module can be enabled or disabled individually, so users pick only what they need.

Architecture Overview

The plugin uses a modular architecture where each feature is a self-contained module within the snacks namespace. A central loader initializes only the modules the user has enabled. Modules share a common configuration pattern and utility layer but do not depend on each other. The Snacks global object provides the API surface, e.g., Snacks.notifier.show(), Snacks.terminal.open(), Snacks.picker.files(). Lazy-loading ensures disabled modules add zero overhead.

Self-Hosting & Configuration

snacks.nvim runs entirely within Neovim. Install the plugin and configure it through the setup opts table. Each module has its own configuration key with sensible defaults. For example, notifier = { timeout = 3000 } configures notification display duration. The dashboard module accepts a preset or custom section layout. No external dependencies are required for core functionality.

Key Features

  • Dashboard: customizable startup screen with shortcuts and recent files
  • Notifier: notification system replacing vim.notify with history and styling
  • Picker: fast file, grep, and buffer picker with preview
  • Terminal: floating and split terminal management
  • Bufdelete: safe buffer deletion without closing windows
  • Words: highlight and navigate LSP references under cursor
  • Scroll: smooth scrolling animations
  • Indent: animated indent guides and scope highlighting
  • Statuscolumn: configurable status column with signs and folds
  • Git: git blame line display and log browsing

Comparison with Similar Tools

Unlike installing separate plugins for each feature (alpha-nvim for dashboard, nvim-notify for notifications, telescope for picking), snacks.nvim consolidates these into one package with consistent configuration. Compared to mini.nvim, which also bundles utilities, snacks.nvim focuses on higher-level UI features while mini.nvim covers lower-level text operations and motions. telescope.nvim is a more full-featured picker with an extension ecosystem, whereas snacks.nvim's picker prioritizes speed and simplicity for common use cases.

FAQ

Q: Do I have to use all modules? A: No. Each module is independent. Only enable the ones you want through the setup opts table. Disabled modules are not loaded.

Q: Does snacks.nvim conflict with other plugins? A: Generally no, since modules are independent. If you use nvim-notify separately, disable the snacks notifier module to avoid conflicts. The same applies to other overlapping plugins.

Q: How do I access the picker? A: Use Snacks.picker.files() for file picking, Snacks.picker.grep() for live grep, or Snacks.picker.buffers() for buffer selection. Bind these to keys in your config.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产