mirror of
https://codeberg.org/Mo8it/dotfiles.git
synced 2024-10-17 20:52:40 +00:00
Replace neotree with nvim-tree
This commit is contained in:
parent
2d6cfaa976
commit
a78157af2b
4 changed files with 19 additions and 24 deletions
|
@ -23,7 +23,7 @@ vim.g.maplocalleader = " "
|
|||
set("n", "<C-k>", cmd("BufferLineCycleNext"), opts)
|
||||
set("n", "<C-j>", cmd("BufferLineCyclePrev"), opts)
|
||||
|
||||
set("n", "<C-b>", cmd("Neotree"), opts)
|
||||
set("n", "<C-b>", cmd("NvimTreeToggle"), opts)
|
||||
|
||||
set("n", "<space>l", cmd("noh"), opts)
|
||||
|
||||
|
|
|
@ -29,11 +29,9 @@ return require("packer").startup({
|
|||
|
||||
-- File tree
|
||||
use({
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
|
|
17
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
17
.config/nvim/lua/plugins/nvim-tree.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
require("nvim-tree").setup({
|
||||
view = {
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = "d", action = "trash" },
|
||||
},
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = true,
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
require_confirm = false,
|
||||
},
|
||||
})
|
|
@ -1,20 +0,0 @@
|
|||
require("neo-tree").setup({
|
||||
window = {
|
||||
position = "float",
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
},
|
||||
hijack_netrw_behavior = "open_current",
|
||||
commands = {
|
||||
-- Override delete to use trash instead of rm
|
||||
delete = function(state)
|
||||
local path = state.tree:get_node().path
|
||||
print(vim.fn.system({ "trash", vim.fn.fnameescape(path) }))
|
||||
require("neo-tree.sources.manager").refresh(state.name)
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
Loading…
Reference in a new issue