Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

pathfinder.nvim

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.
  • :PathfinderJump and <leader>jq select document paths through vim.ui.select.
  • :PathfinderYank and <leader>jy copy current path to + register.
  • :Pathfinder <path> jumps directly to path.
  • <leader>jh or :PathfinderHistory opens recent paths.
  • :PathfinderCopy jq|dot|pointer copies 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.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages