neovim / node-client

Nvim Node.js client and plugin host
https://neovim.io/node-client/
MIT License
484 stars 51 forks source link

findNvim should work without $PATH #267

Closed justinmk closed 2 weeks ago

justinmk commented 10 months ago

Problem

findNvim currently depends on $PATH. That makes it less useful for GUIs where the $PATH may be missing some common nvim install locations. https://github.com/neovim/node-client/pull/207/files#r1265953052

Expected behavior

Search for nvim in common locations, e.g.

/usr/local/bin/
/usr/bin
/opt/homebrew/bin
/home/linuxbrew/.linuxbrew/bin
$HOME/.linuxbrew/bin
$HOME/bin

# lowest priority:
/snap/nvim/current/usr/bin/nvim

as well as any others that we possibly can, such as the install locations for https://github.com/microsoft/winget-cli and https://scoop.sh/ on Windows, if possible.

Also...

Capture time cost for each search step and report that in the result? https://github.com/neovim/node-client/pull/207/files#r1264587700