From 24ae389ee915bd578e52daa02dcd9d4d87a8d82b Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 25 Dec 2022 12:48:58 +0100 Subject: [PATCH] feat(nvim): add telescope-file-browser --- home-manager/neovim/default.nix | 1 + home-manager/neovim/keymaps.lua | 3 ++- home-manager/neovim/telescope.lua | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 4935502..3eca921 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -119,6 +119,7 @@ in telescope-nvim telescope-fzf-native-nvim telescope-ui-select-nvim + telescope-file-browser-nvim # LSP nvim-lspconfig diff --git a/home-manager/neovim/keymaps.lua b/home-manager/neovim/keymaps.lua index 74921f1..45fb44d 100644 --- a/home-manager/neovim/keymaps.lua +++ b/home-manager/neovim/keymaps.lua @@ -23,6 +23,7 @@ nnoremap("G", ":GV --all") local telescope = require("telescope.builtin") local telescope_themes = require("telescope.themes") local telescope_projects = require("telescope").extensions.projects +local telescope_file_browser = require("telescope").extensions.file_browser local function map_telescope(key, telescope_function) vim.api.nvim_set_keymap("n", key, "", { @@ -36,7 +37,7 @@ local function map_telescope(key, telescope_function) end map_telescope("ff", telescope.find_files) -map_telescope("fb", telescope.buffers) +map_telescope("fb", telescope_file_browser.file_browser) map_telescope("fg", telescope.git_files) map_telescope("fp", telescope_projects.projects) map_telescope("fs", telescope.lsp_dynamic_workspace_symbols) diff --git a/home-manager/neovim/telescope.lua b/home-manager/neovim/telescope.lua index 2bb00cd..72472a0 100644 --- a/home-manager/neovim/telescope.lua +++ b/home-manager/neovim/telescope.lua @@ -21,9 +21,13 @@ telescope.setup({ ["ui-select"] = { themes.get_dropdown({}) }, + file_browser = { + hijack_netrw = true, + }, } }) telescope.load_extension("fzf") telescope.load_extension("ui-select") telescope.load_extension("projects") +telescope.load_extension("file_browser")