Replace neotree with nvim-tree
This commit is contained in:
parent
39dfc1554a
commit
767ad054bd
8 changed files with 66 additions and 26 deletions
24
lua/core/keymaps/async/project-tree.lua
Normal file
24
lua/core/keymaps/async/project-tree.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
-- Neotree mappings
|
||||
|
||||
return function(buffer)
|
||||
local api = require "nvim-tree.api"
|
||||
|
||||
local nmap = require("core.utils").createNmap({
|
||||
buffer = buffer,
|
||||
desc = 'nvim-tree: : ',
|
||||
noremap = true,
|
||||
silent = true,
|
||||
nowait = true
|
||||
})
|
||||
|
||||
-- default mappings
|
||||
api.config.mappings.default_on_attach(buffer)
|
||||
|
||||
nmap('<leader><space>', api.tree.toggle, 'File Tree')
|
||||
nmap('t', api.node.open.tab, 'Toggle Node')
|
||||
nmap('<leader>f', function()
|
||||
api.tree.open({
|
||||
find_file = true
|
||||
})
|
||||
end, 'Reveal File In Tree')
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue