Remove nvim-tree and use telescope-file-browser
This commit is contained in:
parent
9865f45e15
commit
c9e0b1ed30
@ -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", "<leader>fj", vim.cmd.NvimTreeFindFile)
|
||||
vim.keymap.set("n", "<leader>ft", vim.cmd.NvimTreeFindFileToggle)
|
||||
|
||||
-- empty setup using defaults
|
@ -3,3 +3,14 @@ vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
|
||||
vim.keymap.set('n', '<leader>fs', builtin.live_grep);
|
||||
vim.keymap.set('v', '<leader>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",
|
||||
"<leader>fb",
|
||||
":Telescope file_browser path=%:p:h select_buffer=true<CR>",
|
||||
{ noremap = true }
|
||||
)
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,4 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.NvimTreeToggle)
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
Loading…
Reference in New Issue
Block a user