aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/pluginsconfig/nvim-tree.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/pluginsconfig/nvim-tree.lua')
-rw-r--r--.config/nvim/lua/pluginsconfig/nvim-tree.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/nvim/lua/pluginsconfig/nvim-tree.lua b/.config/nvim/lua/pluginsconfig/nvim-tree.lua
new file mode 100644
index 0000000..71ebbf2
--- /dev/null
+++ b/.config/nvim/lua/pluginsconfig/nvim-tree.lua
@@ -0,0 +1,10 @@
+local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
+
+Close nvim-tree if last window remaining
+autocmd('BufEnter', {
+ pattern = '*',
+ command = 'if (winnr("$") ==1 && &filetype == "nvimtree") | q | endif'
+})
+
+require('nvim-tree').setup {
+}