mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
61 lines
1.9 KiB
Lua
61 lines
1.9 KiB
Lua
|
return {
|
||
|
-- "nvim-telescope/telescope-file-browser.nvim",
|
||
|
-- dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||
|
-- keys = {
|
||
|
-- {
|
||
|
-- "sf",
|
||
|
-- function()
|
||
|
-- local telescope = require "telescope"
|
||
|
--
|
||
|
-- local function telescope_buffer_dir()
|
||
|
-- return vim.fn.expand "%:p:h"
|
||
|
-- end
|
||
|
--
|
||
|
-- telescope.extensions.file_browser.file_browser {
|
||
|
-- path = "%:p:h",
|
||
|
-- cwd = telescope_buffer_dir(),
|
||
|
-- respect_gitignore = false,
|
||
|
-- hidden = true,
|
||
|
-- grouped = true,
|
||
|
-- previewer = false,
|
||
|
-- initial_mode = "insert",
|
||
|
-- layout_config = { height = 40 },
|
||
|
-- }
|
||
|
-- end,
|
||
|
-- desc = "Open File Browser with the path of the current buffer",
|
||
|
-- },
|
||
|
-- },
|
||
|
-- config = function(_, opts)
|
||
|
-- local telescope = require "telescope"
|
||
|
-- local actions = require "telescope.actions"
|
||
|
-- local fb_actions = require("telescope").extensions.file_browser.actions
|
||
|
-- opts.extensions = {
|
||
|
-- file_browser = {
|
||
|
-- theme = "dropdown",
|
||
|
-- -- disables netrw and use telescope-file-browser in its place
|
||
|
-- hijack_netrw = true,
|
||
|
-- mappings = {
|
||
|
-- -- your custom insert mode mappings
|
||
|
-- ["n"] = {
|
||
|
-- -- your custom normal mode mappings
|
||
|
-- ["N"] = fb_actions.create,
|
||
|
-- ["h"] = fb_actions.goto_parent_dir,
|
||
|
-- ["<C-u>"] = function(prompt_bufnr)
|
||
|
-- for i = 1, 10 do
|
||
|
-- actions.move_selection_previous(prompt_bufnr)
|
||
|
-- end
|
||
|
-- end,
|
||
|
-- ["<C-d>"] = function(prompt_bufnr)
|
||
|
-- for i = 1, 10 do
|
||
|
-- actions.move_selection_next(prompt_bufnr)
|
||
|
-- end
|
||
|
-- end,
|
||
|
-- },
|
||
|
-- },
|
||
|
-- },
|
||
|
-- }
|
||
|
-- telescope.setup(opts)
|
||
|
-- require("telescope").load_extension "file_browser"
|
||
|
-- end,
|
||
|
}
|