From bb05c664d78796b7d26969ccfd3bea6cc9131b03 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 10 Nov 2024 20:02:23 +0100 Subject: add keymap to open telescope in current buffer's dir --- lua/maps/find.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lua/maps/find.lua') diff --git a/lua/maps/find.lua b/lua/maps/find.lua index 5c1b244..9d10a51 100644 --- a/lua/maps/find.lua +++ b/lua/maps/find.lua @@ -1,3 +1,5 @@ +local utility_misc = require("utility.misc") + vim.keymap.set("n", "p", function() require("telescope.builtin").find_files() end) @@ -25,3 +27,9 @@ end) vim.keymap.set("n", "e", function() require("telescope").extensions.file_browser.file_browser() end) + +vim.keymap.set("n", "E", function() + local curr_buf_dir = utility_misc.dir_name(vim.api.nvim_buf_get_name(0)) + + require("telescope").extensions.file_browser.file_browser({ path = curr_buf_dir }) +end) -- cgit v1.2.3-18-g5258