kdheepak / lazygit.nvim Goto Github PK
View Code? Open in Web Editor NEWPlugin for calling lazygit from within neovim.
License: MIT License
Plugin for calling lazygit from within neovim.
License: MIT License
Is your feature request related to a problem? Please describe.
In neovim open the lazygit and checkout branch to switch, but when close the lazygit window, the buffer remain, need to restart vim
Expected behavior
After checkout branch, close the lazygit window, the buffer will also changed
Description
In neovim open the lazygit and checkout branch to switch, but when close the lazygit window, the buffer remain, need to restart vim
Expected behavior
After checkout branch, close the lazygit window, the buffer will also changed
Hi,
I tried using the plugin, and it works functionality wise, but UI is a bit messed up. Here's the screenshot:
My neovim version: NVIM v0.5.0-416-g2b00d1d09
Do you know what could be an issue? Thanks!
Note that it aligns itself after moving around the panels a bit, but initially it is cut like on screenshot.
Description
I've followed the installation steps and I previously had LazyGit installed in my machine and working fine through the terminal. WIthin NeoVim and after installing the plugin through vim-plug, when launching with :LazyGit
the floating window that pops up just says "Process Exited 122".
To Reproduce
:LazyGit
commandExpected behavior
What is expected to happen: It is expected for a window like the normal LazyGit to open within NeoVim.
Screenshots
Desktop (please complete the following information):
Description
My default term is zsh. After open :LazyGit and quit, the default term is changed to bash.
To Reproduce
:Term
, zsh is launched.:LazyGit
to open lazygit and q
to close it.:Term
, bash is launched.Expected behavior
LazyGit should not change the default term.
Desktop (please complete the following information):
NVIM v0.6.0-dev+1517-geece0735f
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210713-16743-1tol26y/build/config -I/tmp/neovim-20210713-16743-1tol26y/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210713-16743-1tol26y/build/src/nvim/auto -I/tmp/neovim-20210713-16743-1tol26y/build/include
编译者 [email protected]
Features: +acl +iconv +tui
See ":help feature-compile"
系统 vimrc 文件: "$VIM/sysinit.vim"
$VIM 预设值: "/usr/local/Cellar/neovim/HEAD-eece073/share/nvim"
Run :checkhealth for more info
I'm about to try out your plugin finally 😁
I was thinking you could add the configuration you list for nvr (at least for nvim items) all within plugin
just by checking for nvr
as an executable and by letting people opt out w/ a global var or something.
Just a thought.
Describe the bug
Loading LazyGit with NeoVim plugin there is conflict when using Esc and then trying to exit LazyGit with 'q' command for quit
To Reproduce
Steps to reproduce the behavior:
Load LazyGit
Press Esc
Then try and leave LazyGit by pressing 'q' for quit won't work
Only way to exit is to use Vim's ":q"
Expected behavior
That exiting the floating LazyGit screen will work regardless of pressing the 'esc' button
Screenshots
Not much need for a screenshot, as the floating LazyGit window just hangs until I select ":q" for vim exit
Version info:
LazyGit Version 0.34
Git version 2.34.1
Description
I'm can't to launch lazygit from neovim when there're spaces in my username
To Reproduce
Here are the steps to reproduce the behavior:
Expected behavior
A float window running Lazygit
What actually happened
A float window saying:
C:\Users\foo bar\scoop\apps\lazygit\current\lazygit.exe
Flags: ......(some help for arguments and flags)
"Unexpected argument: bar"
Desktop (please complete the following information):
NVIM v0.5.0-dev+1102-g595f6e4d6
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -ID:/a/neovim/neovim/build/config -ID:/a/neovim/neovim/src -IC:/projects/nvim-deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include
Compiled by runneradmin@fv-az152-512
Features: -acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM\sysinit.vim"
fall-back for $VIM: "C:/Program Files/nvim/share/nvim"
hi, i was trying to figure out a way to open lazygit at the git repo of the currently active buffer, and came across this code at https://github.com/kdheepak/lazygit.nvim/blob/main/lua/lazygit/utils.lua#L63:
local cmd = string.format('cd "%s" && git rev-parse --show-toplevel', fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h'), root)
apologies if it's a lua feature i'm not familiar with, but it seems like root
is an unused string.format
parameter there?
it would also be a nice enhancement when the path
parameter is provided to lazygit(path)
to open at the toplevel dir, so that -p <path>
doesn't fail when not at the toplevel (..and since all the hard work is done in that function anyway to add it to the list of recently opened repos)
currently i've hacked together this code to do so:
function _G.lazygit_at_buffer()
local cmd = string.format('cd "%s" && git rev-parse --show-toplevel', vim.fn.fnamemodify(vim.fn.resolve(vim.fn.expand('%:p')), ':h'))
local gitdir = vim.fn.system(cmd)
local isgitdir = vim.fn.matchstr(gitdir, '^fatal:.*') == ''
if not isgitdir then
gitdir = nil
end
require('lazygit').lazygit(gitdir)
end
thanks!
Is your feature request related to a problem? Please describe.
In this GIF from README, lines are marked as green and yellow as they are changed/added. I installed lazygit, but it does not show them for me.
Describe the solution you'd like
I'd like to have an option to enable git changes view (am not sure what exactly it is called) in editor.
Additional context
Description
I typically use sessions in vim and often clear out my buffer list using :w | %bd | e#<CR>
which removes all buffers except the current. I didn't realise but this causes the lazy git terminal buffer to be wiped out. I can see in the code that there is a check for if the current buffer is nil
but no check to ensure that the buffer is listed. This causes the window to open but the lazy git command to fail
To Reproduce
Here are the steps to reproduce the behavior using MINRC:
nvim
and start lazy git.%bd | e#<CR>
Expected behavior
What is expected to happen:
The check at here should ensure that the buffer is listed even if it isn't nil and if not listed should create a new one
Screenshots
Desktop (please complete the following information):
Filepath unable to resolve on MacOS due to unescaped 'space'.
Line 56 in e2be2a9
Description
Since the latest stable Neovim version 0.7.2
the integration of nvr
behaves differently:
Instead of opening the commit message buffer in a split inside the current Neovim instance it opens it in a split inside a floating terminal window (see gifs)
Unfortunately I am not familiar with nvr
so maybe this is a simple change of the command there
Maybe this would also be a good time to switch to the "native" --remote
option (#58)
To Reproduce
Make sure you test with Neovim version
0.7.2
Minimal .vimrc to reproduce
" If after installing lazygit.vim, you are having trouble getting it to work, try the following minimal vimrc file.
set nocompatible " be iMproved, required
filetype off " required
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.local/share/nvim/plugged')
Plug 'kdheepak/lazygit.nvim'
" Initialize plugin system
call plug#end()
let mapleader = " "
nnoremap <silent> <leader>lg :LazyGit<CR>
if has('nvim') && executable('nvr')
let $GIT_EDITOR = "nvr -cc split --remote-wait +'set bufhidden=wipe'"
endif
" Save the above to a file `MINRC`, and run `nvim -u MINRC` and type `<leader>lg` in normal mode.
<space>lg
to open LazyGitC
Expected behavior
The commit editor buffer should be opened in the current instance of Neovim (see gif)
Screenshots
The screenshots were taken with my personal config, but the issues is the same with the minimal config above
This is how behaves in 0.7.0
(good)
This is how behaves in 0.7.2
(bad) with no changes to the configuration
Desktop (please complete the following information):
NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az395-591
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info
Description
Using :LazyGitConfig
offers to create config.yml
with the default values at ~/Library/Application Support/jesseduffield/lazygit/
. This does open and pre-populate config.yml
but when saving via :w
the file doesn't exist and is unable to save.
It appears that this section is not running:
if fn.isdirectory(fn.fnamemodify(config_file, ':h')) == false then
-- directory does not exist
fn.mkdir(fn.fnamemodify(config_file, ':h'))
end
And with some local testing, if that does run, it may need this change for creating nested directories:
- fn.mkdir(fn.fnamemodify(config_file, ':h'))
+ fn.mkdir(fn.fnamemodify(config_file, ':h'), 'p')
To Reproduce
Here are the steps to reproduce the behavior using MINRC:
:LazyGitConfig
:w
Expected behavior
The equivalent of mkdir -p
to create the config directory if it doesn't already exist so that the file is able to be saved.
NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3
Running macOS Monterey
➜ ~ lua -v
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
➜ ~ nvim --version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
start nvim and call LazyGit.
In vimrc:
nnoremap <silent> <leader>lg :LazyGit<CR>
let g:lazygit_floating_window_winblend = 0 " transparency of floating window
let g:lazygit_floating_window_scaling_factor = 0.9 " scaling factor for floating window
and i try
nnoremap <silent> <leader>lg :LazyGit<CR>
Is your feature request related to a problem? Please describe.
Using Neovim on Windows, when running :LazyGitConfig
, the path that it looks for the config file is incorrect (it should be ~/AppData/Roaming/lazygit
, assuming that the ~
translates to the USERPROFILE variable)
Describe the solution you'd like
Firstly, the default path on windows could be corrected to look in the right place for a Windows install of lazygit, but a more robust solution would be to provide a configurable setting for the path variable (forgive me if I missed something and this is already possible, but I couldn't tell from the README)
Additional context
If this is already configurable, that's great!
Description
Can not use this plugin in fish because "&&" is not supported in fish
To Reproduce
Expected behavior
fish: Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'. cd "" && git rev-parse --show-toplevel
Screenshots
Is your feature request related to a problem? Please describe.
The lazygit popup by default has round corners, Those round corners can look bad with some font.
Make those border characters configurable with some defaults is better. The telescope.nvim project has an option called borderchars
, e.g.
require('telescope').setup{
defaults = {
borderchars = {"─", "│", "─", "│", "┌", "┐", "┘", "└"},
}
}
Can we have something like this?
Description
Launch Lazygit from a folder without git information (say dashboard or HOME) will result in error, and lazygit float term will be frozen. And I have to restart nvim to get everything work again.
To Reproduce
Expected behavior
Lazyterm tells me that current working directory is not a valid git repo. And I could still close it by pressing q.
Desktop (please complete the following information):
Features: +acl +iconv +tui
See ":help feature-compile"
系统 vimrc 文件: "$VIM/sysinit.vim"
$VIM 预设值: "/usr/local/Cellar/neovim/HEAD-02bf251/share/nvim"
Run :checkhealth for more info
Description
g.lazygit_floating_window_winblend = 1
Correct me if i am wrong but setting the value to 1
, should create a shadow window, sort of like a backdrop
Expected behavior
g.lazygit_floating_window_winblend = 1
I have also installed a plugin called https://github.com/kevinhwang91/rnvimr, and it looks like this
It makes the background of the editor a little bit darker. I assumed I would get the same result with g.lazygit_floating_window_winblend = 1
Desktop (please complete the following information):
↪ nvim --version
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
Features: +acl +iconv +tui
Would be nice when browsing any file, to open LazyGit to the repo that contains that file. Right now it appears to open the repo that contains the directory/file I originally opened in neovim
is it possible to keep the instance running in the background, and not open a new one everytime?
I have to use Windows at work and spawning processes is really very slow.
Is your feature request related to a problem? Please describe.
As you can see here, the file with ??
is a terminal buffer :term
opened in nvim and gets detected by lazygit.
Describe the solution you'd like
Maybe if the buffer is a terminal, it gets ignored by lazygit completely.
Additional context
I guess simply getting bufname() would work ?
Description
I have an misplacement of a few caracters with the telescope interface of lazygit
Expected behavior
As you can see in the following screenshots, a colomn overlap with an up arrow, and the arrows on the left scrollbar are overlapping with the floating window border.
Desktop (please complete the following information):
NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
Features: +acl +iconv +tui
Sorry, I forgot to change branches before sending the pull request! :( I'll open the pull request for the 0.4.3 branch, so don't merge the wrong one...
Here is the error:
E5105: Error while calling lua chunk: /Users/<redacted>/.vim/plugged/lazygit.vim/lua/lazygit.lua:10: attempt to index upvalue 'fn' (a nil value)
To Reproduce
Install Lazygit (using Vim-Plug)
Expected behavior
Lazygit to launch
Screenshots
Desktop (please complete the following information):
Hi,
Thank you for maintaining this neovim plugin. I didn't know that I needed lazygit in my life until I tried it and it has helped me greatly.
I have recently updated my lunarvim config (opinionated wrapper around neovim) and now when I add a space to the commit message it automatically adds " and + as if it concatenate the string.
I am unsure, if you have experiences that error on your end or if I need to raise on the lazyGit repo. Please find attached a video showing my problem.
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az87-780
Thank you for your time
Once I choose which tracked project to open into Telescope plugin, this error occurs
There's no problem if I open lazygit using LazyGit
only, which seems to happen only once the choice is made.
My config is really simple :
I just require('telescope').load_extension('lazygit')
after all (I also added an autocmd using last autocmd api to check projects root).
This bug occurs 2 days ago and I didn't change anything in lazygit/Telescope config so I assume this may be related to last nvim commits
Expected behavior
Once I choose which tracked project to open with LazyGit, I see LazyGit window opened
Sorry, I know this bug report is quite messy. I hope it will help though.
Hi there,
The other day I noticed that lazygit opens for the parent repo containing my submodule and not the submodule repo itself.
Is there a way to prevent this behaviour?
I can confirm that lazygit opens correctly for the submodule if I exit vim and run lazygit.
Description
Lazy git does'nt launch when lazyloaded.
To Reproduce
Here are the steps to reproduce the issue
Expected behavior
What is expected to happen:
Load just fine without affecting anythin
Screenshots
Desktop (please complete the following information):
❯ nvim --version
NVIM v0.5.0
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim/src/neovim-0.5.0/build/config -I/build/neovim/src/neovim-0.5.0/src -I/usr/include -I/build/neovim/src/neovim-0.5.0/build/src/nvim/auto -I/build/neovim/src/neovim-0.5.0/build/include
Fish has different syntax for setting up neovim-remote:
if [ -n "$NVIM_LISTEN_ADDRESS" ];
alias nvim="nvr -cc split --remote-wait +'set bufhidden=wipe'"
end
if [ -n "$NVIM_LISTEN_ADDRESS" ];
set -x VISUAL "nvr -cc split --remote-wait +'set bufhidden=wipe'"
set -x EDITOR "nvr -cc split --remote-wait +'set bufhidden=wipe'"
else
set -x VISUAL "nvim"
set -x EDITOR "nvim"
end
Can we add this to readme?
Hi guys,
I am using Embark theme https://github.com/embark-theme/vim.
However, the UI for lazygit is not usable, for example:
Is there any way to config the background color?
Thanks
Now that neovim/neovim#17439 is merged, will lazygit.nvim be changing its usage of nvr
to nvim 0.7+ its --remote
flag?
Hi, this an off-topic issue, I wonder what are you using to display the pressed keys, as far as I can see it is not screenkey or key-mon. Thanks
lua -v
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
nvim --version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Description
I recently switched over to using git worktrees instead fo branches and lazygit from inside of nvim won't load.
clone a repo using the --bare option
cd into repo dir
git worktree add branchName
cd branchNamed
nvim .
open a file.
launch lazygit
2021/10/28 21:43:38 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues
*fs.PathError stat /Users/markhuggins/dev/work/mosaic5.git/tearsheets-canary/.git/: not a directory
/home/runner/work/lazygit/lazygit/pkg/utils/errors.go:13 (0x159bbcb)
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:113 (0x159bb9a)
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:57 (0x159b319)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:125 (0x164a885)
/home/runner/work/lazygit/lazygit/main.go:124 (0x164cafd)
/opt/hostedtoolcache/go/1.16.7/x64/src/runtime/proc.go:225 (0x10383b6)
/opt/hostedtoolcache/go/1.16.7/x64/src/runtime/asm_amd64.s:1371 (0x106c161)
Expected behavior
lazygit loads correctly
Desktop (please complete the following information):
Currently, the edit hotkey opens the file in the lazygits floating term and makes navigating back to the lazygit impossible. The open shortcut opens the file in the default text editor.
Is it possible for open and edit shortcuts to close the floaterm and just open the buffer in the nvim itself? I am currently on the default settings
I use LazyGit's default keybindings, where <space>
will stage/unstage things. When writing a quick commit message inside LazyGit, one needs to use the <space>
key for spaces.
Here's the problem: I have my leader key set to <space>
, and apparently that still counts when the LazyGit window is open. This has one big disadvantage: any time I press <space>
inside LazyGit (and I do that often), Neovim needs to wait its timeoutlen
before it forwards the keypress. So every time I e.g. want to stage/unstage something, I need to wait timeoutlen
or press some other key to short-cut it. When writing a commit message, every time I add a space, I need to wait timeoutlen
.
I wonder if you've come across this or know of a way to solve this. One idea I had was in the title of this issue: if lazygit.nvim
provided on-open and on-close callbacks, I could set <leader>
to something else while LazyGit is open, and then reset it once it closes.
Thanks for your plugin <3
PS: I tried using Plenary to render the window, and LazyGit behaved the same.
Description
With both vim-fugitive and lazy git installed, when trying to commit using vim-fugitive
, lazy git is opened as well, even when I hadn't triggered it at all.
To Reproduce
Here are the steps to reproduce the behavior using MINRC:
:Gcommit
Expected behavior
What is expected to happen:
If committing with vim fugitive it shouldn't also open a lazygit buffer if the commit wasn't initiated by lazygit.
I think this issue occurs because of this line. I think if there was a check here to see if lazygit was opened maybe by setting a variable to check in that autocommand before opening lazygit again. So when lazygit is opened you can set a let g:lazygit_open=1
and when it is closed set it to 0 and check that
Screenshots
Desktop (please complete the following information):
Pretty much title...
Could be cool to open a floating window on top of the lazygit one. Just a thought :) Don't know if it's possible or not.
I'm using 0.4.3 branch .
Currently, Lazygit has key to exit/return inside itself.
But if I use it inside neovim, seems that key will switch neovim to mode, not returning for Lazygit.
Is there any solution?
Thanks for your work!!
When I set vim.g.lazygit_config_file_path = '~/.config/lazygit/config.yml' lazygit override it to ''
Expected behavior
Use config from lazygit_config_file_path
Desktop (please complete the following information):
MacOS Big Sur
nvim 0.8
lazygit latest
I can't easily get a color theme that looks good.
What are the colors that are available? I tried a color like darkgreen
or #008700
and these don't work. It seems only very simple colors like green
are supported?
Now when run :LazyGit
inside neovim in a folder that is a git
repo after making a change to a file. Stage and commit it using lazygit
(hit <SPC>
and C
). This will try to open a buffer inside nvim
to edit the git commit message.
However, when this happens the lazygit window is closed, and the lazygit process is terminated.
What we want to happen is:
To reproduce, make neovim-remote your default editor when using the terminal in neovim.
The following will use nvim
as the EDITOR
in a normal terminal outside of neovim, and use nvr
as the EDITOR
in a neovim terminal inside of neovim terminal:
Plug 'kdheepak/lazygit.nvim'
nvr
:pip3 install neovim-remote
~/.bashrc
:if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
alias nvim=nvr -cc split --remote-wait +'set bufhidden=wipe'
fi
EDITOR
environment variable in ~/.bashrc
:
if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
export VISUAL="nvr -cc split --remote-wait +'set bufhidden=wipe'"
export EDITOR="nvr -cc split --remote-wait +'set bufhidden=wipe'"
else
export VISUAL="nvim"
export EDITOR="nvim"
fi
~/.vimrc
:if has('nvim') && executable('nvr')
" pip3 install neovim-remote
let $GIT_EDITOR = "nvr -cc split --remote-wait +'set bufhidden=wipe'"
endif
Description
as subject, lazygitfiltercurrentfile
not work with the wrong file path While open neovim in sub folder of the git root
To Reproduce
Here are the steps to reproduce the behavior using MINRC:
Expected behavior
What is expected to happen:
Screenshots
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
When using lazygit, it would be nice to be able to edit the current file inside neovim using nvr
similar to how you can use nvr
to open the commit buffer in the current neovim session rather than an embedded terminal.
I have nvr
setup as specified in the README
and I've set my open command to nvim {{filename}}
but this still opens the file I've selected in lazygit inside the embedded terminal
Describe the solution you'd like
When I select a file in lazygit and hit e
it should open the file as a buffer in my nvim session not within the floating window.
NOTE: I've tried explicitly setting my open
command to nvr {{filename}}
but lazygit seems to be executing nvim afile.ext
regardless
Additional context
nvr
seems to be setup correctly as committing correctly opens the buffer in the nvim session not in the terminal. It just doesn't behave the same way for files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.