Skip to content

VoxelPrismatic/rabbit.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Jump between buffers faster than ever before





Warning

This branch is experiencing rapid changes. Please use tagged releases to ensure stability.

Rabbit.nvim

A plugin that allows you to switch between buffers faster than ever before, featuring a much more intuitive experience. You can customize almost every part of it, so it fits right into your workflow.

Why

  • Telescope
    1. Consumes your screen; switch context
      • Rabbit takes up a small spot in the corner of your screen
    2. Previews aren't literally where they would appear, making you switch contexts multiple times for a single action
      • Rabbit shows previews in the window you're about to open it. When you select a file, the only thing that happens is the borders disappear
    3. No warnings for missing dependencies
      • Rabbit warns you if tools like rg or fzf are not installed
    4. Does not order by recency or split by window
      • Rabbit does both
  • Harpoon
    1. Built for @ThePrimeagen, meaning it's very basic and not intuitive
      • Rabbit shows a legend of actions you can perform
    2. You have to remember where you are and where you were
      • Rabbit allows you to forget about both
  • :b #
    1. You have to remember buffer numbers
      • Rabbit obviously does this for you
    2. You can't open closed buffers
      • Rabbit allows you to open closed buffers
  • Buffer line
    1. Buffer line is designed for mouse users
      • Rabbit is keyboard-first
    2. You cannot scroll if you have lots of buffers open
      • Rabbit is a vertical list, so you can scroll if you need to
  • :ls
    1. Does not tell you what buffers are open
      • Rabbit does, and, which were recently closed!

Preview

video.mp4

*apologies for the crappy quality, wayland is sucky

Additional Features

  • Per-token highlighting in fuzzy find preview
  • Ripgrep auto-runs /query for you
  • LSP diagnostics preview

Install

---@type LazyPluginSpec
return {
	-- Optional, if you want icons for renamed files
	{
		"nvim-tree/nvim-web-devicons",
		lazy = true,
	},

	-- Rabbit
	{
		"voxelprismatic/rabbit.nvim",

		-- Important! The master branch is the previous version
		branch = "rewrite",

		-- Important! Rabbit should launch on startup to track buffers properly
		lazy = false,

		---@type Rabbit.Config
		opts = {},
		config = true,
	}
}

Requirements

  • Neovim v0.10.0 + LuaJIT
  • Linux, macOS, WSL or other Posix environment
    • Windows is not supported. Any unreproduceable bugs on Windows will not be resolved
  • Rabbit will warn you dynamically if any other dependencies are not installed

Quick Start

To launch Rabbit, simply run <leader>r, or use the :Rabbit [plugin name] command.

Note

When you launch Rabbit with a specific plugin, the plugin will be loaded live if possible.

Rabbit is expansive & modular; almost nothing is hard-coded. Feel free to look at the config, everything is fully documented. You may also use the ---@type Rabbit.Config directive in your plugin manager's config.