Add Telescope File Browser.

This commit is contained in:
Henry Denny 2024-03-18 21:40:13 +00:00
parent 2970ccd315
commit c4a7fb50c0
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
config = function()
local telescope = require('telescope')
telescope.setup {
extensions = {
file_browser = {
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
},
},
}
telescope.load_extension("file_browser")
-- Keymaps
-- vim.api.nvim_set_keymap(
-- "n",
-- "<space>sb",
-- ":Telescope file_browser<CR>",
-- { noremap = true }
-- )
-- open file_browser with the path of the current buffer
vim.api.nvim_set_keymap(
"n",
"<space>sb",
":Telescope file_browser path=%:p:h select_buffer=true<CR>",
{ noremap = true }
)
end
}