When you press Ctrl-G in the Pi coding agent,
Pi writes your prompt to a temp file and opens it in $VISUAL. pibuf.nvim
detects that buffer (filetype pi) and adds two buffer-local pickers:
<C-f>— pick a project file and insert an@<path>mention.<C-s>— pick an installed Pi skill and insert a/skill:<name>reference.
- Neovim >= 0.12
- snacks.nvim, telescope, fzf-lua or mini.pick
- Pi, with
$VISUALpointing at Neovim, e.g.export VISUAL="env NVIM_APPNAME=nvim nvim"
Install using lazy.nvim:
{
"S1M0N38/pibuf.nvim",
version = "1.*",
dependencies = {
"folke/snacks.nvim",
-- "nvim-telescope/telescope.nvim",
-- "ibhagwan/fzf-lua",
-- "nvim-mini/mini.pick",
},
opts = {
picker = "snacks",
-- picker = "telescope",
-- picker = "fzf-lua",
-- picker = "mini.pick",
},
}opts = {} lets lazy.nvim auto-call setup(), which registers the pi
filetype detection and the picker keymaps. No manual setup() call needed.
For development, see CONTRIBUTING.md.
- Press
Ctrl-Gin Pi — pibuf sets the buffer filetype topi. - Edit the prompt:
<C-f>opens a file picker (project root); confirm to insert@<path>.<C-s>opens a skills picker; confirm to insert/skill:<name>.
:wq/ZZto send the edited prompt;:cqto cancel and keep the original.
Run :checkhealth pibuf to verify your setup. Read the full docs with :help pibuf.