A blazing fast and easy to configure neovim statusline plugin written in pure lua.
5.72k
stars
455
forks
source link
Bug: diff component does not automatically update upon file changes or repo changes (commits) outside of neovim #1166
Open
camoz opened 6 months ago
Self Checks
How to reproduce the problem
nvim --clean
:let &rtp.=','.'~/.local/share/nvim/site/pack/myplugins/opt/lualine.nvim'
:packadd lualine.nvim
:luafile /path/to/lualine-default-config.lua
Expected behaviour
Actual behaviour
:e
to see the current state.Additional information
From skimming the code, it seems to me that the git diff result is cached and only updated upon the event
BufWritePost
(but I'm not sure): https://github.com/nvim-lualine/lualine.nvim/blob/2248ef254d0a1488a72041cfb45ca9caada6d994/lua/lualine/components/diff/git_diff.lua#L27I was able to fix the part for external changes to the file by adding another line
but I'm really not sure if this is the correct way of fixing this.
I guess fixing the part where the changes of the open file are (partly) committed to the repo is a bit more complicated and maybe out of scope?