From 958e4d0584f10d655c9d8aa27b0870ebcd6b11b6 Mon Sep 17 00:00:00 2001 From: RayHammer Date: Fri, 12 May 2023 20:05:05 +0200 Subject: Fixed Neotree not updating Git status on save --- init.vim | 8 +++++++- lua/init.lua | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 1a43a06..b29b316 100644 --- a/init.vim +++ b/init.vim @@ -26,6 +26,7 @@ Plug 'bluz71/vim-moonfly-colors' " File Browsers Plug 'nvim-lua/plenary.nvim' Plug 'MunifTanjim/nui.nvim' +Plug 'nvim-tree/nvim-web-devicons' Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v2.x' } Plug 'mcchrish/nnn.vim' @@ -79,7 +80,12 @@ let g:ale_linters = { let g:neoformat_enabled_cs = [ 'csharpier' ] augroup fmt autocmd! - autocmd BufWritePre * undojoin | Neoformat + autocmd BufWritePre *.cs undojoin | Neoformat +augroup END + +augroup git + au! + au BufWritePost * silent Git status augroup END " NNN settings diff --git a/lua/init.lua b/lua/init.lua index 27f32f1..d9a62fd 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -15,6 +15,7 @@ end local neotree = require("neo-tree") neotree.setup({ close_if_last_window = false, + enable_git_status = true, enable_refresh_on_write = true, icon = { folder_closed = "", @@ -49,6 +50,7 @@ neotree.setup({ hide_dotfiles = false, } }, + event_handlers = {} }) -- LSP -- cgit v1.2.3