Allow user's to define their own nvim-tree bindings (#1181)

This commit is contained in:
tafryn 2021-08-02 22:43:57 -07:00 committed by GitHub
parent 21419b244c
commit c0a653a0cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()