Skip to content

Instantly share code, notes, and snippets.

@zmunk
Created November 8, 2025 08:04
Show Gist options
  • Select an option

  • Save zmunk/4f72bc10b20c39e52379eb022d7811a2 to your computer and use it in GitHub Desktop.

Select an option

Save zmunk/4f72bc10b20c39e52379eb022d7811a2 to your computer and use it in GitHub Desktop.
Zoxide picker in neovim (using mini.pick)
local minipick = require("mini.pick")
local zoxide_picker = function()
local zoxide_output = vim.fn.system('zoxide query -l')
local zoxide_dirs = vim.split(zoxide_output, '\n', { trimempty = true })
-- open launcher to choose directory
-- once a directory is selected, open a second launcher to select a file
-- from directory using file picker
minipick.start({
source = {
items = zoxide_dirs,
choose = function(dir)
vim.fn.chdir(dir)
return minipick.builtin.files()
end
}
})
end
vim.keymap.set('n', '<Space>fz', zoxide_picker,
{ noremap = true, silent = true, desc = "Zoxide directory picker" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment