diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-10-07 14:28:28 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-10-07 14:28:53 +0300 |
commit | befb47b82d6d644f59c22e401f4207fea75606a9 (patch) | |
tree | f98e68f41e12b97e453cc182976a743b65074be7 /nvim | |
parent | 652e7e90a4055d1c6e3883155b0ea0fe4a003c89 (diff) | |
download | dotfiles-befb47b82d6d644f59c22e401f4207fea75606a9.tar.gz |
chore(nvim): upgrade nvim-tree to the new config
Diffstat (limited to 'nvim')
-rw-r--r-- | nvim/.config/nvim/lua/filetree.lua | 27 |
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 }) |