-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please install yazi.
when running Neovim via desktop entry due to yazi
being installed for current user
#463
Comments
As far as I remember, there is no custom checking for path in this plugin. Do you get the same results in |
No I don't, |
If you start the Are you sure In my zsh config I only set This plugin uses this implementation for finding yazi: Lines 52 to 54 in 813b066
My guess is your environment is somehow not set up correctly - I think neovim does not see yazi and that caused this issue. |
Yes. :term
% which yazi
/home/xfzv/.local/share/cargo/bin/yazi
I'm using the following in my export PATH="$XDG_DATA_HOME/cargo/bin:$PATH"
I think the problem is just that desktop entries use the default % mv ~/.config/zsh ~/.config/zsh.bak
# Start a new interactive shell
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/18/bin
# Same with root account, untouched `$PATH` variable
% su -
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/18/bin so any binary outside of these paths will be considered as nonexistent. If I do: sudo cp ~/.local/share/cargo/bin/{ya,yazi} /usr/bin or use the custom desktop entry in order to explicitly add |
Ah I see, that makes sense - I think the desktop entry never extends the PATH variable so the yazi executable cannot be found. My guess is running I agree that this is pretty surprising behaviour, but I think it's difficult to handle this in yazi.nvim. I would like managing the PATH to be the user's responsibility. |
OK, fair enough. I doubt many users are launching Neovim with the desktop entry anyway. Creating a custom one to explicitly set Thanks! |
Linux user here.
yazi
is installed only for my regular user viacargo
soya
andyazi
binaries are in$XDG_DATA_HOME/cargo/bin
directory.When running
nvim
from my interactive shell, no issue whatsoever withyazi.nvim
since$XDG_DATA_HOME/cargo/bin
is in my$PATH
. However, if I open Neovim from the desktop entry (/usr/share/applications/nvim.desktop
),yazi.nvim
won't open and the following message will be printed:yazi.nvim/lua/yazi.lua
Lines 20 to 23 in 813b066
/usr/share/applications/nvim.desktop
content:Using
Exec=sh -c "PATH=/home/xfzv/.local/share/cargo/bin:$PATH kitty -e nvim"
in a local desktop entry ($XDG_DATA_HOME/applications/nvim.desktop
) solves the problem.Just wondering if there is a better way. I never run Neovim via the desktop entry as far as I'm concerned, but I thought this shouldn't be a problem if some users want to.
Maybe some additional checks for
ya
andyazi
binaries availability could be implemented, or maybe adding a note in theREADME
?Edit: my
yazi.nvim
config just in case:The text was updated successfully, but these errors were encountered: