sort telescope recent buffers based on usage

This commit is contained in:
Baipyrus 2024-07-24 21:49:37 +02:00
parent 0021ecd32e
commit 4485e74869

View File

@ -114,7 +114,11 @@ return {
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader>sc', builtin.command_history, { desc = '[S]earch [C]ommand History' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader><leader>', function()
builtin.buffers {
sort_mru = true,
}
end, { desc = '[ ] Find existing buffers' })
-- Telescope live_grep in git root
-- Function to find the git root directory based on the current buffer's path