2022-10-06 04:44:41 +00:00
|
|
|
require('nvim-tree').setup({
|
2022-10-21 21:47:53 +00:00
|
|
|
-- hijack_netrw = true,
|
|
|
|
-- hijack_directories = {
|
|
|
|
-- enable = true,
|
|
|
|
-- auto_open = true,
|
|
|
|
-- },
|
2022-10-06 04:44:41 +00:00
|
|
|
view = {
|
|
|
|
mappings = {
|
|
|
|
list = {
|
|
|
|
{ key = "<CR>", action = "edit_in_place" },
|
|
|
|
{ key = "<C-i>", action = "toggle_file_info" },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
remove_keymaps = {
|
|
|
|
'<C-k>'
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2022-10-21 21:47:53 +00:00
|
|
|
-- local function toggle_replace()
|
|
|
|
-- local view = require('nvim-tree.view')
|
|
|
|
-- if view.is_visible() then
|
|
|
|
-- view.close()
|
|
|
|
-- else
|
|
|
|
-- require('nvim-tree').open_replacing_current_buffer()
|
|
|
|
-- end
|
|
|
|
-- end
|
2022-10-06 04:44:41 +00:00
|
|
|
|
2022-10-21 21:47:53 +00:00
|
|
|
-- swapping this out with drex.nvim instead
|
|
|
|
-- vim.keymap.set('n', '-', function() toggle_replace() end, { noremap = true, silent = true })
|
2022-10-07 17:03:34 +00:00
|
|
|
vim.keymap.set('n', '<leader>n', [[<Cmd>NvimTreeToggle<CR>]], { noremap = true, silent = true })
|