aboutsummaryrefslogtreecommitdiff
path: root/nvim/.config
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/lua/filetree.lua27
1 files changed, 17 insertions, 10 deletions
diff --git a/nvim/.config/nvim/lua/filetree.lua b/nvim/.config/nvim/lua/filetree.lua
index 43f7da3..28c61b8 100644
--- a/nvim/.config/nvim/lua/filetree.lua
+++ b/nvim/.config/nvim/lua/filetree.lua
@@ -1,13 +1,20 @@
local tree_cb = require'nvim-tree.config'.nvim_tree_callback
-vim.api.nvim_set_keymap('n', '<F3>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
-
-vim.g.nvim_tree_auto_close = 1
-vim.g.nvim_tree_group_empty = 1
-
-vim.g.nvim_tree_bindings = {
- { key = "l", cb = tree_cb("edit") },
- { key = "h", cb = tree_cb("parent_node") and tree_cb("close_node") },
- { key = "cw", cb = tree_cb("rename") },
- { key = "o", cb = tree_cb("create") },
+require'nvim-tree'.setup {
+ auto_close = true,
+ open_on_tab = true,
+ open_on_setup = true,
+ hijack_cursor = true,
+ view = {
+ mappings = {
+ list = {
+ { key = "l", cb = tree_cb("edit") },
+ { key = "h", cb = tree_cb("parent_node") and tree_cb("close_node") },
+ { key = "cw", cb = tree_cb("rename") },
+ { key = "o", cb = tree_cb("create") },
+ }
+ }
+ }
}
+
+vim.api.nvim_set_keymap('n', '<F3>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })