Created
November 8, 2025 08:04
-
-
Save zmunk/4f72bc10b20c39e52379eb022d7811a2 to your computer and use it in GitHub Desktop.
Zoxide picker in neovim (using mini.pick)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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