From a49bb724111ea77881f1cc37dae0d369164bc04b Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Thu, 4 Jan 2024 00:25:11 +0300 Subject: [PATCH] feat(nvim) : neotree closes when last buffer or on file open --- dotfiles/nvim/lua/plugins/mrflos.lua | 36 +++++++++++++--------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/dotfiles/nvim/lua/plugins/mrflos.lua b/dotfiles/nvim/lua/plugins/mrflos.lua index 22638a2..cf83207 100644 --- a/dotfiles/nvim/lua/plugins/mrflos.lua +++ b/dotfiles/nvim/lua/plugins/mrflos.lua @@ -1,16 +1,4 @@ return { - -- add telescope-fzf-native - { - "telescope.nvim", - dependencies = { - "nvim-telescope/telescope-fzf-native.nvim", - build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - config = function() - require("telescope").load_extension("fzf") - end, - }, - }, - -- theme Rosé Pine { 'rose-pine/neovim', name = 'rose-pine' }, @@ -20,13 +8,21 @@ return { opts = { colorscheme = "rose-pine", }, - } + }, - -- NeoScroll plugin --- { --- "karb94/neoscroll.nvim", --- config = function () --- require('neoscroll').setup {} --- end --- } + -- Neotree plugin + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + close_if_last_window = true, + event_handlers = { + { + event = "file_opened", + handler = function() + vim.cmd([[Neotree close]]) + end, + }, + } + }, + }, }