From f187d61006eadd1792602fd64a73d062e694059f Mon Sep 17 00:00:00 2001 From: saibotk Date: Fri, 16 Jun 2023 02:07:11 +0200 Subject: [PATCH] nvim: fix nvim-tree toggle keybind --- nvim/lua/filemanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvim/lua/filemanager.lua b/nvim/lua/filemanager.lua index d04ad86..0804eec 100644 --- a/nvim/lua/filemanager.lua +++ b/nvim/lua/filemanager.lua @@ -56,4 +56,5 @@ nvimtree.setup { vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif") -- KEYMAPS -vim.keymap.set('n', 'e', nvimtree.toggle) +local api = require("nvim-tree.api") +vim.keymap.set('n', 'e', api.tree.toggle)