From faca7b63ce271ac835427f8e03e4f51af10f189e Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 17 Oct 2024 11:58:51 +0200 Subject: [PATCH] better telescope.builtin.oldfiles configuration --- lua/kickstart/plugins/telescope.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index 37aa1e4..7e0eb68 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -111,8 +111,12 @@ return { vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) - vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) - vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + vim.keymap.set('n', 'sr', function() + builtin.oldfiles { + only_cwd = true, + } + end, { desc = '[S]earch [R]ecent Files in CWD' }) + vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Global Files' }) vim.keymap.set('n', 'sc', builtin.command_history, { desc = '[S]earch [C]ommand History' }) vim.keymap.set('n', '', function() builtin.buffers {