summaryrefslogtreecommitdiff
path: root/lua/maps
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-11-10 20:02:23 +0100
committerHampusM <hampus@hampusmat.com>2024-11-10 20:02:23 +0100
commitbb05c664d78796b7d26969ccfd3bea6cc9131b03 (patch)
tree996cdc0cc306f781ae03c2b5785ad546ecb53ee8 /lua/maps
parent4a32ba0d4dbb63fe9332bd2666e429e8d84dbfa1 (diff)
add keymap to open telescope in current buffer's dir
Diffstat (limited to 'lua/maps')
-rw-r--r--lua/maps/find.lua8
1 files changed, 8 insertions, 0 deletions
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", "<leader>p", function()
require("telescope.builtin").find_files()
end)
@@ -25,3 +27,9 @@ end)
vim.keymap.set("n", "<leader>e", function()
require("telescope").extensions.file_browser.file_browser()
end)
+
+vim.keymap.set("n", "<leader>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)