diff --git a/after/plugin/nvim-tree.lua b/after/plugin/nvim-tree.lua deleted file mode 100644 index 2e6e71b..0000000 --- a/after/plugin/nvim-tree.lua +++ /dev/null @@ -1,14 +0,0 @@ -local tree = require("nvim-tree") -tree.setup() - --- disable netrw at the very start of your init.lua -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - --- set termguicolors to enable highlight groups -vim.opt.termguicolors = true - -vim.keymap.set("n", "fj", vim.cmd.NvimTreeFindFile) -vim.keymap.set("n", "ft", vim.cmd.NvimTreeFindFileToggle) - --- empty setup using defaults diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index 4ee46ac..de6a0d5 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -3,3 +3,14 @@ vim.keymap.set('n', 'ff', builtin.find_files, {}) vim.keymap.set('n', 'fs', builtin.live_grep); vim.keymap.set('v', 'fs', builtin.grep_string); + +-- To get telescope-file-browser loaded and working with telescope, +-- you need to call load_extension, somewhere after setup function: +require("telescope").load_extension "file_browser" + +vim.api.nvim_set_keymap( + "n", + "fb", + ":Telescope file_browser path=%:p:h select_buffer=true", + { noremap = true } +) diff --git a/lua/myworkflow/packer.lua b/lua/myworkflow/packer.lua index 897cdf9..e18328b 100644 --- a/lua/myworkflow/packer.lua +++ b/lua/myworkflow/packer.lua @@ -54,6 +54,8 @@ return require('packer').startup(function(use) -- Neovim development use 'folke/neodev.nvim' - -- Project explorer - use { 'nvim-tree/nvim-tree.lua', requires = 'nvim-tree/nvim-web-devicons' } + use { + "nvim-telescope/telescope-file-browser.nvim", + requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" } + } end) diff --git a/lua/myworkflow/remap.lua b/lua/myworkflow/remap.lua index 226ce8d..10cc062 100644 --- a/lua/myworkflow/remap.lua +++ b/lua/myworkflow/remap.lua @@ -1,5 +1,4 @@ vim.g.mapleader = " " -vim.keymap.set("n", "pv", vim.cmd.NvimTreeToggle) vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv")