A Neovim plugin that extends fzf-lua with additional utilities.
- Folder-Specific Grep: Select a folder and run live grep within it
- GitHub PR Viewer: List, view, and filter GitHub PRs directly from Neovim
(If you have suggestions, feel free to file an issue)
- Neovim >= 0.7.0
- fzf-lua
- fd (for folder-specific grep)
- GitHub CLI (for GitHub PR functionality)
Using lazy.nvim
{
'nuvic/fzf-kit.nvim',
dependencies = { 'ibhagwan/fzf-lua' },
config = function()
require('fzf-kit').setup({
-- Optional configuration
})
end
}fzf-kit provides the following commands:
:FzfKit FolderGrep- Select a folder and run live grep within it:FzfKit GithubPRs- List and interact with GitHub PRs
-- Folder-specific grep
require('fzf-kit').folder_grep()
-- GitHub PR interaction
require('fzf-kit').github_prs()When using the GitHub PR functionality, the following actions are available:
- Enter: View PR details in a scratch buffer
- Ctrl-c: Checkout the PR
- Ctrl-f: Filter PRs (by assignee, author, state, etc.)
- Ctrl-o: Open PR in browser
fzf-kit can be configured by calling the setup function:
require('fzf-kit').setup({
github = {
-- GitHub configuration options
default_filters = {}, -- Default PR filters
buffer_position = "vsplit", -- Where to open PR view buffer ("vsplit", "split", etc.)
},
folder = {
-- Folder grep configuration
fd_command = "fd --type d", -- Command to list directories
fd_args = {}, -- Additional arguments for fd
}
}){
github = {
default_filters = {},
buffer_position = "vsplit",
},
folder = {
fd_command = "fd --type d",
fd_args = {},
}
}Add these to your Neovim configuration:
-- Folder-specific grep
vim.keymap.set('n', '<leader>sf', require('fzf-kit').folder_grep, { desc = 'Grep in folder' })
-- GitHub PR interaction
vim.keymap.set('n', '<leader>gp', require('fzf-kit').github_prs, { desc = 'GitHub PRs' })- macOS:
brew install fd - Ubuntu/Debian:
apt install fd-find - Arch Linux:
pacman -S fd
- macOS:
brew install gh - Ubuntu/Debian:
apt install gh - Arch Linux:
pacman -S github-cli - Other: See GitHub CLI installation
See CHANGELOG.md for version history.