mirror of
https://codeberg.org/mfussenegger/nvim-fzy.git
synced 2026-11-17 02:30:41 +00:00
Fuzzy picker & vim.ui.select implementation via fzy for neovim
- Lua 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| demo | ||
| doc | ||
| lua | ||
| plugin | ||
| .editorconfig | ||
| .gitignore | ||
| .luacheckrc | ||
| LICENSE | ||
| README.md | ||
nvim-fzy
A vim.ui.select implementation for the fzy CLI.
Installation
- Requires Neovim (latest stable or nightly)
- Install fzy and make sure it is in your
$PATH. - nvim-fzy is a plugin. Install it like any other plugin:
- If using vim-plug:
Plug 'mfussenegger/nvim-fzy' - If using packer.nvim:
use 'mfussenegger/nvim-fzy'
- If using vim-plug:
Usage
nvim-fzy provides the vim.ui.select implementation and a execute function
to feed the output of commands to fzy.
Create some mappings like this:
lua fzy = require('fzy')
nnoremap <silent><leader>ff :lua fzy.execute('fd', fzy.sinks.edit_file)<CR>
nnoremap <silent><leader>fg :lua fzy.execute('git ls-files', fzy.sinks.edit_file)<CR>
nnoremap <silent><leader>fl :lua fzy.execute('ag --nobreak --noheading .', fzy.sinks.edit_live_grep)<CR>
See :help fzy for more information
To get additional pickers to jump to tags and other stuff, you can use it in combination with nvim-qwahl
Enjoy
Customize
- You can override the
new_popfunction if you want to customize the floating window. - You can override the
commandfunction if you want to customize thefzyshell command.
Take a look at the source to see the default implementations.
Goals
- Have a simple API so people can create their custom actions.
- Include the essentials, but not much more than that.
This plugin is pretty much done and won't see feature additions, unless there is a convincing case to be made.
