A unified interface for multiple Neovim picker plugins (Telescope, FZF-Lua, and Snacks). Write your code once and let users choose their preferred picker backend!
- Auto-detects available picker providers based on your configuration
- Seamlessly switch between Telescope, FZF-Lua, and Snacks.picker
- 40+ common pickers that work across all providers
- Nice collection of exclusive pickers for each provider
- Custom picker API for creating your own powerful pickers
- Sensible default keybindings
Using lazy.nvim:
{
'2KAbhishek/pickme.nvim',
cmd = 'PickMe',
event = 'VeryLazy',
dependencies = {
-- Include at least one of these pickers:
'folke/snacks.nvim', -- For snacks.picker
-- 'nvim-telescope/telescope.nvim', -- For telescope
-- 'ibhagwan/fzf-lua', -- For fzf-lua
},
opts = {
picker_provider = 'snacks', -- Default provider
},
}
require('pickme').setup({
-- Choose your preferred picker provider
picker_provider = 'snacks', -- Options: 'snacks' (default), 'telescope', 'fzf_lua'
-- Auto-detect available picker providers (default: true)
-- If the specified picker_provider is not available, will try to use one from provider_priority list
detect_provider = true,
-- Add default keybindings (default: true)
-- See Keybindings section below for the full list of default keybindings
add_default_keybindings = true,
-- Command aliases for convenient shortcuts
-- Example: using ':PickMe grep' will call ':PickMe live_grep'
command_aliases = {
grep = 'live_grep',
-- Add your own aliases here
}
})
These pickers are available across all three supported providers (snacks, telescope, fzf_lua):
autocmds
- List autocommandsbuffer_grep
- Search within current bufferbuffers
- Browse and select open bufferscolorschemes
- Browse and apply colorschemescommand_history
- View command historycommands
- Browse available commandsdiagnostics
- View workspace diagnosticsfiles
- Find files in the current directorygit_branches
- View and checkout git branchesgit_commits
- Browse git commit historygit_files
- Find files tracked by Gitgit_log_file
- View git commits for the current buffergit_log_line
- View git history for current linegit_stash
- Browse git stash entriesgit_status
- View files with git status changesgrep_string
- Search for the word under cursorhelp
- Search through help tagshighlights
- Browse highlight groupsjumplist
- Navigate through jump historykeymaps
- Browse configured key mappingslive_grep
- Search for a string in your project (grep)loclist
- Browse location listlsp_declarations
- Find declarations with LSPlsp_definitions
- Go to definition of the symbol under cursorlsp_document_symbols
- List symbols in current documentlsp_implementations
- Find implementations of the interface under cursorlsp_references
- Find references to the symbol under cursorlsp_type_definitions
- Find type definitionslsp_workspace_symbols
- Search for workspace symbolsman
- Browse manual pagesmarks
- View and jump to marksoldfiles
- Browse recently opened filesoptions
- Browse Neovim optionspickers
- Browse available pickersquickfix
- Browse quickfix listregisters
- View contents of registersresume
- Resume the last pickersearch_history
- View search historyspell_suggest
- Get spelling suggestions for word under cursortreesitter
- Navigate treesitter symbols
cliphist
- Browse clipboard historygit_log
- View detailed git loggrep_buffers
- Search across all open buffersicons
- Browse and insert iconslazy
- Search through lazy.nvim plugin specslsp_config
- Browse LSP server configurationsprojects
- Browse and switch between projects
options
- View Neovim optionsicons
- Browse symbols (with devicons)tags
- Work with ctags
breakpoints
- View DAP debugger breakpointsgit_tags
- Browse git tagsoptions
- View Neovim optionsprofiles
- Switch FZF profilestabs
- Browse and switch between tabstags
- Work with ctagstmux_cliphist
- Browse tmux clipboard history
These are utility functions you can use to create your own pickers:
select_file
- Custom file picker with provided itemscustom_picker
- Fully customizable picker with custom items and handlers
local pickme = require('pickme')
-- Basic usage
pickme.pick('files', { title = 'Find Files' })
pickme.pick('live_grep', { title = 'Search Text' })
-- Select file from a list of files
pickme.select_file({
items = { "path/to/file1.txt", "path/to/file2.lua", "path/to/file3.md" },
title = "Select a file to open"
})
-- Using custom picker
pickme.custom_picker({
title = 'My Custom Picker',
items = {'item1', 'item2', 'item3'},
entry_maker = function(item)
return { display = item, value = item }
end,
preview_generator = function(item)
return "Preview content for " .. item
end,
preview_ft = 'markdown',
-- Action to perform on selection / when <CR> is pressed
selection_handler = function(_, selection)
print("Selected: " .. selection.value)
end,
-- Optional custom actions mapped to keys
action_map = {
['<C-s>'] = function(_, selection)
vim.notify("Selection: " .. selection.value)
end
}
})
Example Usages:
- custom_picker in octohub.nvim/repos.lua
- select_file in tdo.nvim/init.lua
If add_default_keybindings = true
in your setup, the following keybindings will be automatically configured:
Keybinding | Command | Description |
---|---|---|
<leader>, |
buffers |
Buffers |
<leader>/ |
search_history |
Search History |
<leader>: |
command_history |
Command History |
<leader><space> |
files |
Files |
<C-f> |
files |
Files |
<leader>fa |
files |
Find Files |
<leader>fb |
buffers |
Buffers |
<leader>fc |
git_log_file |
File Commits |
<leader>fd |
projects |
Project Dirs |
<leader>ff |
git_files |
Find Git Files |
<leader>fg |
live_grep |
Grep |
<leader>fl |
loclist |
Location List |
<leader>fm |
git_status |
Modified Files |
<leader>fo |
grep_buffers |
Grep Open Buffers |
<leader>fp |
resume |
Previous Picker |
<leader>fq |
quickfix |
Quickfix List |
<leader>fr |
oldfiles |
Recent Files |
<leader>fs |
buffer_grep |
Buffer Lines |
<leader>ft |
pickers |
All Pickers |
<leader>fu |
undo |
Undo History |
<leader>fw |
grep_string |
Word Grep |
<leader>fz |
zoxide |
Zoxide |
<leader>gL |
git_log |
Git Log |
<leader>gS |
git_stash |
Git Stash |
<leader>gc |
git_commits |
Git Commits |
<leader>gl |
git_log_line |
Git Log Line |
<leader>gs |
git_branches |
Git Branches |
<leader>ii |
icons |
Icons |
<leader>ir |
registers |
Registers |
<leader>is |
spell_suggest |
Spell Suggestions |
<leader>iv |
cliphist |
Clipboard |
<leader>lD |
lsp_declarations |
LSP Declarations |
<leader>lF |
lsp_references |
References |
<leader>lL |
diagnostics |
Diagnostics |
<leader>lS |
lsp_workspace_symbols |
Workspace Symbols |
<leader>ld |
lsp_definitions |
LSP Definitions |
<leader>li |
lsp_implementations |
LSP Implementations |
<leader>ll |
diagnostics_buffer |
Buffer Diagnostics |
<leader>ls |
lsp_document_symbols |
Document Symbols |
<leader>lt |
lsp_type_definitions |
Type Definitions |
<leader>oC |
colorschemes |
Colorschemes |
<leader>oa |
autocmds |
Autocmds |
<leader>oc |
command_history |
Command History |
<leader>od |
help |
Docs |
<leader>of |
marks |
Marks |
<leader>og |
commands |
Commands |
<leader>oh |
highlights |
Highlights |
<leader>oj |
jumplist |
Jump List |
<leader>ok |
keymaps |
Keymaps |
<leader>ol |
lazy |
Search for Plugin Spec |
<leader>om |
man |
Man Pages |
<leader>on |
notifications |
Notifications |
<leader>oo |
options |
Options |
<leader>os |
search_history |
Search History |
<leader>ot |
treesitter |
Treesitter Find |
<leader>ecc |
Custom | Neovim Configs |
<leader>ecP |
Custom | Plugin Files |
If you want to disable the default keybindings, set add_default_keybindings = false
in your setup.
You can add your own keybindings by using the pickme.pick
function or the PickMe
command. For example:
local pickme = require('pickme')
vim.keymap.set('n', '<leader>ff', function() pickme.pick('git_files', { title = 'Git Files' }) end, { desc = 'Git Files' })
vim.keymap.set('n', '<leader>fg', function() pickme.pick('live_grep') end, { desc = 'Live Grep' })
vim.keymap.set('n', '<leader>fa', ':PickMe files<cr>', { desc = 'All Files' })
Run :help pickme.txt
for more details.
- You tell me!
I was tired of maintaining separate implementations for different picker plugins in my Neovim extensions. Now I can write the code once and let users pick their preferred UI!
- Finding information about different pickers supported by picker providers was time consuming.
- Got to create a unified interface for different pickers.
- dots2k β Dev Environment
- nvim2k β Personalized Editor
- sway2k β Desktop Environment
- qute2k β Personalized Browser
- nerdy.nvim β Find nerd glyphs easily
- tdo.nvim β Fast and simple notes in Neovim
- termim.nvim β Neovim terminal improved
- octohub.nvim β Github repos in Neovim
- exercism.nvim β Exercism exercises in Neovim
β hit the star button if you found this useful β
Source | Blog | Twitter | LinkedIn | More Links | Other Projects