-
Notifications
You must be signed in to change notification settings - Fork 106
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
"diff" is not exectuable (Windows | Neovim nightly) #168
Comments
the plugin requires diff.exe for the diff panel to work. If you don't have the tool under %PATH% you may simply turn off the diff panel by default. Usually the diff.exe comes with the official vim installation, but I'm not sure about neovim. It's fairly easy to just borrow the exe if needed. |
Guess I was just trying to avoid installing another application to get my configuration working remotely. It seems based on Vim's license I can just host their I guess Neovim stable accounts for |
To fix this, either put the latest
or direct the command to WSL with a script like this @ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
REM Expects 2 parameters that are full Windows paths `DRIVE:PATH`
REM Converts drive letter to lower case, fixes path separators and checks /mnt/drive/path on WSL
SET ARG1=%~1
SET ARG2=%~2
SET DRIVE1=%ARG1:~0,1%
SET PATH1=%ARG1:~2%
SET DRIVE2=%ARG2:~0,1%
SET PATH2=%ARG2:~2%
SET PATH1=!PATH1:\=/!
SET PATH2=!PATH2:\=/!
for %%C IN (a b c d e f g h i j k l m n o p q r s t u v w x y z) DO (
SET DRIVE1=!DRIVE1:%%C=%%C!
SET DRIVE2=!DRIVE2:%%C=%%C!
)
wsl -e diff "/mnt/%DRIVE1%%PATH1%" "/mnt/%DRIVE2%%PATH2%"
|
Here is my solution on windows
Configure diff.exe in your options -- my_nvim_path/lua/options.lua
if vim.fn.has "win32" == 1 then -- only windows
vim.g.undotree_DiffCommand = "my_nvim_path/lua/bin/diff.exe"
end This worked for me! |
for more info on the solution and why it is necessary: mbbill/undotree#168
issue
When triggering
UndotreeToggle
in Neovim nightly on Windows I get the following error:This only happens on Windows when running running the nightly build of Neovim. I don't get this error when running the same configuration via Neovim stable (
v0.9.5
) on Windows, or Neovim stable/nightly on Ubuntu.I see that others have mentioned this error in another issue. I've also seen discussion of this issue on the neovim subreddit. But their solution is not applicable in this case, as I set PowerShell 7 as my terminal (
:h powershell
); wherediff
is a valid command. As mentioned before, undotree works fine usingdiff
in Neovim stable on Windows via the same configuration.setting powershell as default shell
lazy config
system info
The text was updated successfully, but these errors were encountered: