fix: escape newlines in text
chore: correctly set gitignore
fix(element): add element file
azy.nvim
fuzzy finder for neovim
based on fzy
This plugin provides a simple UI to select an item from a list.
It has the following features:
You can come an discuss about this plugin on the #azy
IRC channel on
libera.chat.
Bug reports can be submitted here
WARNING: this plugin will clash with nvim-fzy and guihua so you need to only have one of these installed at a time
As this plugin requires the compilation of a small C library, you will have to have the following system dependencies:
C
compiler in your path, to compile the librarypkg-config
, to search for the dependenciesluajit
and it's headers (libluajit-5.1-dev
on Ubuntu), to
link against itlibpthread
and it's headers (intalled by default on Ubuntu),
that's a dependency to build fzy
.Furthermore, this plugin is tested against the latest released version of neovim only.
Using packer.nvim
:
use { 'https://git.sr.ht/~vigoux/azy.nvim', run = 'make lib' }
You can configure azy
as any other plugin using the azy.setup
function. Note though that this is not required for this plugin to
work, as it only configures the features of azy
:
require'azy'.setup {
preview = false, -- Whether to preview selected items on the fly (this is an unstable feature, feedback appreciated)
debug = false, -- Enable debug output and timings in the UI
mappings = { -- Configure the mappings
["<Up>"] = "prev", -- Select the previous item
["<Down>"] = "next", -- Select the next item
["<CR>"] = "confirm", -- Confirm the selection, open the selected item
["<C-V>"] = "confirm_vsplit", -- Same as confirm but in a vertical split
["<C-H>"] = "confirm_split", -- Same as confirm but in a horizontal split
-- ["<ESC>"] = "exit" -- Disabled by default, but possible, this will exit instead of going to normal mode on escape
-- Normal mode mapping are not configurable:
-- <ESC>: exits without confirm
},
}
-- If you want to enable the vim.ui.select integration too
vim.ui.select = require'azy.builtins'.select
For some nice pickers based on vim.ui.select
, I'd recomend looking
into qwahl.
This plugin provides a bunch of builtin searchs.
These builtin functions return a function suitable for
vim.keymap.set
when called, so that one can do the following:
vim.keymap.set("n", "<Leader>e", require'azy.builtins'.files(), {})
You can find the full list of the builtin searches by looking in the help file:
:help azy.builtins
This plugin provides some highlight groups to customize its look:
AzyMatch
: to highlight positions in the string that match the
queryAzyDim
: for extra informations (dimmed)AzyStandout
: for extra informations (standout)AzyTitle
: for the title of the azy window (when specified)I made this plugin so that I don't feel any blocking when I am typing. This means that in some cases where the number of entries to search from is huge, you might encounter some performance problems.
If that is the case, feel free to report it with the list of entries that caused the problem, and what you did when encountering the problem, and I'll be glad to look into it.
Note though that on reasonably sized word lists, you should not encounter any problem.
Furthermore, using an asynchronous UI, as the results are incrementally sorted, one should not feel any blocking point. For the record, using the asychronous UI, search in a directory with more than 300K does not lead to any blocking (any update takes less that 10ms).
This project can be considered my own version ov telescope.nvim.
The goal of this plugin will be different than telescope.nvim. This plugin focuses on speed and non-intrusivness rather that configurability.
This project is hosted on sr.ht, and the development takes place on this mailing list