scMRU.nvim
scMRU.nvim copied to clipboard
scMRU - source control: Most Recently Used files
Telescope integrated per repo MRU/MFU
When working with multiple source repositories, it is often beneficial to have
one file cache per repository.
Files are automatically added to the database and associated with the current
repository.
Untracked files are stored in the global cache.
| :MruRepos | MRU for untracked files |
|---|---|
![]() |
![]() |
| MRU for neovim git repo | MRU for my neovim dotfiles |
![]() |
![]() |
Requirements
- neovim >= 0.6(required)
- telescope.nvim (required)
Installation
Packer.nvim
use 'ilAYAli/scMRU.nvim'
sudo apt install sqlite3 libsqlite3-dev
Usage
:MruRepos Display cached repositories and bring up the associated cache
:Mru Display most recently used files for the current repo (cwd)
:Mfu Display most frequently used files for the current repo (cwd)
:MruAdd Explicity add a file from the database
:MruDel Explicity remove a filename from database
lua require("mru").display_cache({root="__global__",algorithm="mfu"})
Keymap example
vim.api.nvim_set_keymap('n', '<F1>', "<Cmd>MruRepos<CR>", opts)
vim.api.nvim_set_keymap('n', '<F2>', "<Cmd>Mru<CR>", opts)
vim.api.nvim_set_keymap('n', '<F3>', "<Cmd>Mfu<CR>", opts)
Todo
- Support other SCM's (svn, mercurial, ...)
- Improve configurability
- Windows support



