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
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
local import = require('core.utils').createImporter("core.keymaps")
|
||||
|
||||
import('general')
|
||||
import('project-tree')
|
||||
import('file-search')
|
||||
import('diagnostics')
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
-- Neotree mappings
|
||||
|
||||
vim.keymap.set('n', '<leader><space>', ':Neotree toggle<cr>', { desc = 'File tree' })
|
||||
vim.keymap.set('n', '<leader>nf', ':Neotree filesystem reveal<cr>', { desc = 'Reveal in file tree' })
|
||||
Loading…
Add table
Add a link
Reference in a new issue