signcolumns hide the left borders(for configs that have the signcolumn
opt active. Requires to be set twice(this may be a personal config
scenario). The first sets for the floating window created, the second
for lazygit's UI.
We have already worked out the "git root" for the current buffer, we did
this to work out the relative path. We might as well use this
information when calling `lazygitfilter`.
This now allows `lazygitfiltercurrentfile` to work, whether your actual
cwd is a git repository ('normal' workflow) or a project folder
containing many repositories (another workflow many vim users follow).
It looks like LSP did an autoformat on the file also, I can revert those
two lines if required.
If a user is on windows, and is using powershell as the default nvim
shell the command at [line 69 of
utils.lua](https://github.com/lucaSartore/lazygit.nvim/blob/main/lua/lazygit/utils.lua#L67C2-L67C130)
won’t work due to the `&&` operator.
> local cmd = string.format('cd "%s" && git rev-parse --show-toplevel',
fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h'), root)
I fixed this by forcing the use of cmd.
## Motivation:
If I close LazyGit after having done some changes (Commit
something/change branch…) I often run into some minor inconsistency with
the UI on screen, that does not get updated to reflect the changes.
In particular the issue I’m having is with the color of the files inside
the [neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim) view. I
understand this is a really insignificant issue, but I still would like
to fix it.
## Proposed solution:
I have added an option that allow an user of the plugin to add a
callback that is automatically executed after exiting LazyGit, so that I
can put there the necessary code to refresh my UI
Passes `work-tree` and `git-dir` arguments for Lazygit.
This is very useful when using a bare git repo, so that Lazygit can still be used to manage the repo.
Add a recommendation to use 'keys' to set the keybinding to load lazygit.nvim if using lazy.nvim. If the keybinding is set elsewhere, e.g. in a config() function, the plugin won't be loaded the first time this is run - the user will have to use `: LazyGit` first.
There is an existing user config for setting the winblend value of the
lazygit floating window. This controls the background transparency of
the window. However, this config option is not respected if the lazygit
window is created using plenary (another user config). This change
forces the plenary window to use the existing config for transparency.
Add `LazyGitBorder` and `LazyGitFloat` highlighting groups using nvim(>=0.7.2) function `vim.api.nvim_set_hl`.
Add full list of window border for useful customize.
The provided instructions help to set up an environment where pressing the key `e` on a file in `lazygit` will edit the file in the same nvim instance.