Announcing ‘mini.visits’
Originally posted on Reddit
Hello, Neovim users!
It is my pleasure to bring you mini.visits - new module of mini.nvim which can track and reuse file system visits. It can also be installed using separate GitHub repository.
Note: This demo uses custom vim.ui.select()
from mini.pick.
TL;DR: This is a ‘mini.nvim’ version of a combination of nvim-telescope/telescope-frecency.nvim (persistently track file visits and select from them) and ThePrimeagen/harpoon (persistently add/remove labels to paths and select based on them).
But there is no feature parity with any of them (and is not planned), as the overall design and assumed workflows are slightly different. Here is a link to a more detailed comparisons.
Features:
Persistently track file system visits (both files and directories) per project directory. Store visit index is human readable and editable.
Visit index is normalized on every write to contain relevant information. Exact details can be customized.
Built-in ability to persistently use label paths for later use.
Exported functions to reuse visit data:
List visited paths/labels with custom filter and sort (uses “robust frecency” by default). Can be used as source for pickers.
Select visited paths/labels using
vim.ui.select()
.Iterate through visit paths in target direction (“forward”, “backward”, “first”, “last”).
Exported functions to manually update visit index allowing persistent track of any user information.
For more information, see these tags in help file:
For full documentation see help file.
There are also two new ‘mini.pick’ pickers for mini.extra: visit_paths()
and visit_labels()
. These are essentially a slightly polished alternatives (with file icons, preview, etc.) to built-in pickers which use vim.ui.select()
.
Please, check it out and tell me what you think! You can leave your suggestions either here in comments or in dedicated beta-testing issue.
Thanks!