Skip to content

Commit

Permalink
feat(nvim): telescope oldfiles on cwd only
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Sep 27, 2023
1 parent 1984abf commit acdbf3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/neovim/config/lua/user/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ vim.keymap.set("n", "<C-p>", function()
find_command = { "rg", "--hidden", "--files", "--smart-case", "--glob=!.git" },
})
end, opts)
vim.keymap.set("n", "<leader>of", builtin.oldfiles, opts)
vim.keymap.set("n", "<leader>of", function()
builtin.oldfiles({
only_cwd = true,
})
end, opts)
vim.keymap.set("n", "<leader>lg", builtin.live_grep, opts)
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts)
Expand Down

0 comments on commit acdbf3d

Please sign in to comment.