diff options
| author | tafryn <[email protected]> | 2021-08-02 22:43:57 -0700 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-03 05:43:57 +0000 | 
| commit | c0a653a0cf5ef1842b086149b9e79a79cc62583d (patch) | |
| tree | 3db8c37b009229eb679fe80f219804bec5213d94 /lua/core | |
| parent | 21419b244c40350ee09ef3a5cf6b1ad19054b23f (diff) | |
Allow user's to define their own nvim-tree bindings (#1181)
Diffstat (limited to 'lua/core')
| -rw-r--r-- | lua/core/nvimtree.lua | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/lua/core/nvimtree.lua b/lua/core/nvimtree.lua index 4e3c0ef6..e29168e9 100644 --- a/lua/core/nvimtree.lua +++ b/lua/core/nvimtree.lua @@ -59,11 +59,13 @@ M.setup = function()    local tree_cb = nvim_tree_config.nvim_tree_callback -  g.nvim_tree_bindings = { -    { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" }, -    { key = "h", cb = tree_cb "close_node" }, -    { key = "v", cb = tree_cb "vsplit" }, -  } +  if not g.nvim_tree_bindings then +    g.nvim_tree_bindings = { +      { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" }, +      { key = "h", cb = tree_cb "close_node" }, +      { key = "v", cb = tree_cb "vsplit" }, +    } +  end  end  --  M.focus_or_close = function() | 
