API: "find Nvim" function
justinmk opened this issue · 2 comments
justinmk commented
UIs and other Nvim applications often search for Nvim in the system/environment, or else they require users to specify an exact path.
- similar usecase is firenvim's get_progpath() though that obviously requires Nvim already.
node-client
could save a lot of hassle by providing a function like:
findNvim(minVersion: string)
with this behavior:
- finds
nvim
in the current environment at a given minimumversion
- If nvim not found at given version, return an error that mentions the version that was found
- return a usable path (like aforementioned firenvim
get_progpath
logic)- Actually this could be in
nvim
itself. Maybev:progpath
should be smarter?
- Actually this could be in
tsukinoko-kun commented
I have never used node-client but would like to contribute. Where should this function be located?
justinmk commented
It could probably just live in https://github.com/neovim/node-client/blob/master/packages/neovim/src/index.ts