lazygit
lazygit copied to clipboard
LazyGit Seemingly Not Reading in Config
Describe the bug
I am attempting to add an enterprise github service to my lazygit config. After adding services
config and still being unable to open a PR against the enterprise instance, I started testing other configurations to debug. It looks like none of those are being read in either.
My config and proof of config location
❯ cat /Users/john.smith/.config/lazygit/config.yml
gui:
authorColors:
'John Smith': 'green'
'*': '#0000ff'
os:
editCommand: 'vim'
services:
'foo-github.com': 'github:foo-github.com'
❯ lazygit -cd
/Users/john.smith/.config/lazygit
To Reproduce Steps to reproduce the behavior:
- Check config directory with
lazygit -cd
- Create a new config in
$CONFIG_DIR/lazygit/config.yml
- Execut lazygit
- Create PR, and check URL in PR is pointing to your enterprise github instance
Expected behavior
I'd expect that opening a PR uses the services
config or errors if improperly configured.
Version info:
❯ lazygit --version
commit=, build date=, build source=homebrew, version=0.36.0, os=darwin, arch=amd64, git version=2.38.1
❯ git --version
git version 2.38.1
Additional context Add any other context about the problem here.
As a side note- I attempted to debug but the log file is not being created after running with --debug
.
Note: please try updating to the latest version or manually building the latest master
to see if the issue still occurs.
Does it fail to start when there's an error in the config?
No, no failures or errors anywhere that I can see. It simply does not show any of the expected config changes.
I think I'm wrong about the config not working. I actually am seeing author initials reflected in the same colors I have set in this config.
I am still not able to open a PR against our GHE instance though with this config.
I'm having this issue currently on windows just tried settings and nothing happens just opens normal VIM no hotkey changes are working as well.
os:
editCommand: 'nvim'
@A-Lamia try using two spaces instead of tabs.
@mark2185 yeah still nothing sadly
Could you post the path to your config, the entire config, and the output of running lazygit -cd
?
path: C:\Users\Lamia\AppData\Roaming\lazygit\config.yml lazygit -cd: C:\Users\Lamia\AppData\Roaming\lazygit
config:
os:
editCommand: 'nvim'
keybinding:
appendNewLine: '<a-o>'
Is nvim
in the path? Try
keybinding.appendNewLine
is sadly not used at all, try setting something that's visible right from the get go, e.g. the theme
gui:
showIcons: true
theme:
activeBorderColor:
- '#1eaeff'
- bold
that is interesting the color changed, wait how is lazygit running the commands ?
EDIT: i tried neovide that is in my path and that did not work.
It runs cmd /c nvim
in the background.
yeah im not sure i tried neovide, nvim, vscode all of them can be launched from both cmd and powershell but vim is what it keeps openin.
EDIT: cmd /c nvim
from the same terminal works fine as well.
That's odd, it first checks for os.editCommand, and only if that's empty does it check git's editor and whatnot.
What does the log (bottom right panel) say after opening a file?
cmd /c vim
regardless of what you put in there?
open works fine, edit works fine but commit in editor is in VIM is this normal ?
Yup, according to the source:
// runs git commit without the -m argument meaning it will invoke the user's editor
func (self *CommitCommands) CommitEditorCmdObj() oscommands.ICmdObj {
return self.cmd.New(fmt.Sprintf("git commit%s%s", self.signoffFlag(), self.verboseFlag()))
}
yeah i just got everything working LOL sorry for bothering you.
my brain was tunneled on the commit part, i assumed that editCommand
set the editor for everything and every time i made a change i was testing with the commit function
I think for people like me who decide to leave there brain in the fridge when i woke up you should add something here https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#configuring-file-editing
about commit editor being ran with gits set editor. :)
Well, it's not file editing per se, it's committing.
We could add this, but given the confusion regarding edit
and commit
, I doubt anyone would benefit from it:
commitChanges: 'c' # commit with git's set editor