From 11b08c9c012e1cd46ac08a229a5298af28b8a489 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 8 Jun 2024 22:24:35 +0200 Subject: use telescope file browser --- lua/maps/find.lua | 7 +++++++ lua/plugins.lua | 10 ++++++++++ lua/telescope_config.lua | 13 +++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lua/maps/find.lua b/lua/maps/find.lua index aad0e46..67b8239 100644 --- a/lua/maps/find.lua +++ b/lua/maps/find.lua @@ -26,3 +26,10 @@ vim.api.nvim_set_keymap( { silent = true, noremap = true } ) +vim.api.nvim_set_keymap( + "n", + "e", + ":Telescope file_browser", + { silent = true, noremap = true } +) + diff --git a/lua/plugins.lua b/lua/plugins.lua index 82801e1..8a36e7c 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -103,6 +103,16 @@ return require("packer").startup(function(use) cmake --build build --config Release && \ cmake --install build --prefix build" } + + use { + "nvim-telescope/telescope-file-browser.nvim", + requires = { + { + "nvim-lua/plenary.nvim", + commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" + } + } + } -- Telescope end -- Markdown diff --git a/lua/telescope_config.lua b/lua/telescope_config.lua index 391c38d..fa46f62 100644 --- a/lua/telescope_config.lua +++ b/lua/telescope_config.lua @@ -1,2 +1,11 @@ -require('telescope').setup({}) -require('telescope').load_extension('fzf') +require("telescope").setup({ + extensions = { + file_browser = { + grouped = true + } + } +}) + +require('telescope').load_extension("fzf") +require('telescope').load_extension("file_browser") + -- cgit v1.2.3-18-g5258