Add working configuration for git worktrees

Brandon Conway 2021-12-24 10:27:13 -08:00
parent bc99e29740
commit bb4730c9a0

@ -2,4 +2,24 @@
This plugin lets you use lazygit in a floating window inside neovim.
![](https://user-images.githubusercontent.com/1813121/87866391-79fcfe00-c93e-11ea-94a9-204947de1b39.gif)
![](https://user-images.githubusercontent.com/1813121/87866391-79fcfe00-c93e-11ea-94a9-204947de1b39.gif)
---
If you use git worktrees, the plugin [may not work for you](https://github.com/kdheepak/lazygit.nvim/issues/46). You can use floaterm to open lazygit yourself (giving you most, if not all, of what the plugin gives you) with this config:
```vim
let g:floaterm_borderchars = "─│─│╭╮╯╰"
let s:width = "1.0"
let s:height = "1.0"
let s:autoclose = "1"
let s:command = 'lazygit'
function! s:open_lazygit_popup()
execute "FloatermNew --height=" . s:height . " --width=" . s:width . " --autoclose=" . s:autoclose . " " . s:command
endfunction
nnoremap <silent> <leader>lg :call <SID>open_lazygit_popup()<CR>
```
You may want to change the height and width to a lower percentage of your window size.