Closed peteringram0 closed 5 months ago
It's a bit unusual to set the EDITOR variable to an absolute path, lazygit doesn't support that. My recommendation would be to do something like this instead:
export PATH="$HOME/code/helix/target/release:$PATH"
export EDITOR=hx
This should work.
@stefanhaller This does work but only works if i remove helix from homebrew. Should the EDITOR variable not support both relative and local pathings?
@stefanhaller This does work but only works if i remove helix from homebrew.
I don't understand, can you explain more?
Should the EDITOR variable not support both relative and local pathings?
It is only possible to support arbitrary paths for the edit
command, but not for editAtLine
(which is used when you press e
in the staging view), because different editors have different command-line options for specifying the line number. That's why we decided to go with the editPreset approach that we are using now, which either defines all edit commands or none of them, since it would be confusing if pressing e
in the files panel would open helix, but in the staging view it would open vim.
@stefanhaller
I currently have helix installed via homebrew as well as having the source and a custom compiled version which i added to PATH
as an ALIAS
. This ALIAS
seems to take pirority rather then items in PATH
.
I didnt realise Lazygit does this, but after checking it only works for me using the lazygit config EDITOR override as per your comment suggests.
I think using this config is the best approach for me here and agree this is most likley unusual configuration from my side.
Describe the bug Lazygit is not honouring custom set $EDITOR value. ZSH shell.
To Reproduce Steps to reproduce the behavior:
.zshrc
$EDITOR
. It will open up the helix instance from source as expectedExpected behavior Lazygit should send the file specified to $EDITOR however it opens up in a default text based reader (some kind of fallback).
Version info: commit=, build date=, build source=homebrew, version=0.41.0, os=darwin, arch=arm64, git version=2.45.1 git version 2.45.1
Note Using the config below fixes the issue however this should not be needed if
EDITOR
within shell is set.