Local JSON/YAML path helper for Neovim 0.12+.
Uses the installed nvim-treesitter plugin. JSON and YAML parsers are installed
automatically on first use when missing.
Features:
- Shows path under cursor in hover popup.
:PathfinderJumpand<leader>jqselect document paths throughvim.ui.select.:PathfinderYankand<leader>jycopy current path to+register.:Pathfinder <path>jumps directly to path.<leader>jhor:PathfinderHistoryopens recent paths.:PathfinderCopy jq|dot|pointercopies a path in selected format.- Optional statusline component through
require("pathfinder").statusline().
vim.ui.select is used as picker interface. Telescope, fzf-lua, Snacks and
other picker plugins can provide their own vim.ui.select implementation. A
custom picker can also be passed as picker = function(items, opts, callback).
Popup settings:
opts = {
popup = { enabled = true, winblend = 10, position = "auto", max_width = 80 },
history = { enabled = true, max = 20 },
}Set vim.b.pathfinder_disable = true to disable Pathfinder in one buffer.
Run smoke tests with:
nvim --headless -u NONE \
-c 'set rtp+=/path/to/pathfinder.nvim' \
-c 'enew' \
-c 'luafile tests/headless.lua' \
-c 'qa!'Configured through nvim/lua/plugins/pathfinder.lua.