Neovim plugin that lets you fuzzy search for folds in a file using Telescope.
telescope.nvim is required for this plugin to work.
Use your favorite plugin manager, for example with packer.nvim:
use {
'roosta/telescope-folds.nvim',
requires = {'nvim-telescope/telescope.nvim'},
config = function()
require('telescope').load_extension('folds')
end
}Or with lazy.nvim:
{
'roosta/telescope-folds.nvim',
dependencies = {'nvim-telescope/telescope.nvim'},
config = function()
require('telescope').load_extension('folds')
end
}telescope-folds introduces a command :Folds and a Telescope extension.
:Folds
Open a Telescope picker and search for folds in the current file. On selection, telescope-folds will move
you to that fold's line number and open just enough folds to show the fold you
selected (zv).
require('telescope').extensions.folds.folds()It can be useful to bind this command to something:
-- Vim script
vim.cmd([[nnoremap <leader>jf :Folds<CR>]])
-- Lua
vim.keymap.set('n', '<leader>jf', ':Folds<CR>', { noremap = true, silent = true })
-- or
vim.keymap.set('n', '<leader>jf', function()
require('telescope').extensions.folds.folds()
end, { noremap = true, silent = true })- gbirke/telescope-foldmarkers.nvim: Quickly jump to your fold markers {{{
- roosta/fzf-folds.vim: Vim plugin that lets you fuzzy search for folds in a file
This is a lua port of fzf-folds.vim which was written in vimscript and using
fzf.vim as an interface. That plugin was
in turn inspired by
foldlist, which was
inspired by taglist.