Giter Club home page Giter Club logo

lazygit.nvim's People

Contributors

aabccd021 avatar avimitin avatar carbon-steel avatar cleong14 avatar cnrrobertson avatar ecosse3 avatar ethanwarrick avatar frantisekstanko avatar gmerzu avatar isos9 avatar jdelkins avatar kdheepak avatar lawrence-laz avatar mike325 avatar nazeehe avatar pythoner6 avatar rocco-gossmann avatar rsheasby avatar smartding avatar srivatsan260 avatar tashreeqpeck avatar theblob42 avatar thefux avatar wurli avatar xrayw avatar yorik1984 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lazygit.nvim's Issues

Auto refresh the buffer when checkout branch

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

Buffer not refresh when checkout branch

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

Lazygit window cut on left side

Hi,

I tried using the plugin, and it works functionality wise, but UI is a bit messed up. Here's the screenshot:

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.

Process Exited 122 when launching

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

  1. Install LazyGit on your terminal with HomeBrew Tap
  2. Install kdheepak/lazygit.nvim plugin
  3. Run :LazyGitcommand

Expected behavior

What is expected to happen: It is expected for a window like the normal LazyGit to open within NeoVim.

Screenshots

Screenshot 2021-10-28 at 08 17 13

Desktop (please complete the following information):

  • nvim --version:

Screenshot 2021-10-28 at 08 44 54

Run lazygit inside neovim will change default term to bash.

Description

My default term is zsh. After open :LazyGit and quit, the default term is changed to bash.

To Reproduce

  1. Launch neovim, :Term, zsh is launched.
  2. :LazyGit to open lazygit and q to close it.
  3. :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

Suggestion: Check for `nvr` and auto add `.vimrc` updates

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.

Bug exiting lazyGit

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

Unable to boot lazygit if there're spaces in username

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:

  1. Open Neovim using a user that has spaces in name
  2. Enter the command :LazyGit

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 --version:

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"

open at current buffer's git repo

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!

Show git changes status in editor

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

I'm talking about these here:
image

Lazy git cannot open because buffer is no longer listed causing -> Invalid buffer id: <N>

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

Screen Shot 2020-11-10 at 15 43 09

To Reproduce

Here are the steps to reproduce the behavior using MINRC:

  1. Open nvim and start lazy git.
  2. run %bd | e#<CR>
  3. try to open lazy git again

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):

  • nvim --version:
    NVIM v0.5.0-nightly-180-gd17e508796
    Build type: Release
    LuaJIT 2.0.5

lazygit.lua:21:attempt to index field 'o'(a nil value)

Description

when i run :Lazygit, I got this error message.

To Reproduce

this is my lazygit version:

Plug 'kdheepak/lazygit.nvim', {'branch': 'nvim-v0.4.3'}

Screenshots

image

Desktop (please complete the following information):

  • nvim --version: v0.4.4

nvr integrations behaves differently in 0.7.2

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.
  1. open Neovim inside a git repository
  2. press <space>lg to open LazyGit
  3. stage at least one file
  4. press C

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)
lazygit_old

This is how behaves in 0.7.2 (bad) with no changes to the configuration
lazygit_new

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

Lazygit config file is not created on macOS if directory doesn't exist

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:

  1. Install lazygit.nvim
  2. Run :LazyGitConfig
  3. Answer "y" to creating the default config when none exists
  4. Save via :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 –version:
NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3

Running macOS Monterey

E5105: lazygit.lua:10: attempt to index upvalue 'fn' (a nil value)

➜ ~ 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.
Image of Yaktocat
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>

Default config file location customization

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!

Can not use this plugin in fish

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

[Feature Request] configurable border characters

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.
pic-selected-201016-1303-44

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?

Launch Lazygit from a folder without git information result in error.

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

  1. Launch neovim.
  2. Launch Layzygit.
  3. Error message shows in float term.

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):

  • nvim --version:
    NVIM v0.6.0-dev+1518-g02bf251bb
    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-20210714-39663-lqn3eb/build/config -I/tmp/neovim-20210714-39663-lqn3eb/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210714-39663-lqn3eb/build/src/nvim/auto -I/tmp/neovim-20210714-39663-lqn3eb/build/include
    编译者 [email protected]

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

`lazygit_floating_window_winblend = 1` does not work

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

Screenshot_2022-12-15_23-20-49

I have also installed a plugin called https://github.com/kevinhwang91/rnvimr, and it looks like this

Screenshot_2022-12-15_23-23-53

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

persistent instance of lazygit

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.

Ignoring terminal buffers opened in git repos

Is your feature request related to a problem? Please describe.

image

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 ?

Interface minor bug

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.

Screenshots
lazygit positionning 1
lazygit positionning 2

Desktop (please complete the following information):

  • nvim --version:
NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui

Pull request for wrong branch.

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...

Getting error on launching

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):

  • nvim --version:
    NVIM v0.4.3
    Build type: Release
    LuaJIT 2.0.5

Extra characters added during commit messages

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.

asciicast

  • nvim --version:

NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az87-780

Thank you for your time

Window closed immediately (Telescope Plugin)

Once I choose which tracked project to open into Telescope plugin, this error occurs

image

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

  • nvim --version: NVIM v0.8.0-dev+146-g44a4af0ed

Sorry, I know this bug report is quite messy. I hope it will help though.

Submodule > lazyg opens for parent repo

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.

Lazy loading error

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

video-210716-1250-04.mp4

Desktop (please complete the following information):

  • nvim --version:
❯ 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

Add docs for neovim-remote integration for fish

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?

[OT] Keystrokes in video

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

E5105: lazygit.lua:15: attempt to index upvalue 'fn' (a nil value)

  • 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
  • The error is shown after executing the command LazyGit
    image

Not working with git worktrees

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):

  • nvim --version:
    NVIM v0.5.0
    Build type: Release

(O)pen file and (e)dit file in the current nvim instance?

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

Add callbacks to run functions when LazyGit opens/closes

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.

Commit buffer opened by vim-fugitive causes lazygit to open

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:

  1. Install fugitive and lazygit plugin
  2. Open a fugitive git commit buffer using :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):

  • nvim --version:

<ESC> key not work with Lazygit inside Neovim

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!!

lazygit_config_file_path overwritten

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

Q: what is the list of available colors?

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?

Support using neovim-remote in lazygit.nvim for creating commit messages

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:

  • when lazygit tries to open the git commit message the floating window is hidden and not destroyed
  • when the commit message is saved and when that buffer is closed, the window for lazygit is restored

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:

  1. Install lazygit.nvim using your favorite plugin manager:
Plug 'kdheepak/lazygit.nvim'
  1. Install nvr:
pip3 install neovim-remote
  1. Add the following to your ~/.bashrc:
if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
    alias nvim=nvr -cc split --remote-wait +'set bufhidden=wipe'
fi
  1. Set 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

  1. Add the following to your ~/.vimrc:
if has('nvim') && executable('nvr')
  " pip3 install neovim-remote
  let $GIT_EDITOR = "nvr -cc split --remote-wait +'set bufhidden=wipe'"
endif

lazygitfiltercurrentfile not working while current folder is not git root

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):

  • nvim --version:

Allow opening files from lazy git as nvim buffer (not inside floating terminal)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.