Open xiyaowong opened 1 month ago
Should we search wsl's $PATH?
Should we search wsl's $PATH?
We could try that in the future, but I think just changing the current paths: string[]
to a cmds: string[][]
solve the main problem for now.
I'm not sure I follow. What should findNvim
actually return in this case? The full WSL command, or just the nvim
path?
The missing piece is that consumers like https://github.com/vscode-neovim/vscode-neovim/pull/2287 can't send a full command which represents "nvim". It can only send a location (arg0
) or directory.
node-client doesn't need to know about WSL, it just needs to run what the consumer gives it. Currently the consumer can only send arg0
, but we can fix that by allowing consumers to send [arg0, arg1, ...]
.
I have a PR that I'll post in a minute. https://github.com/neovim/node-client/pull/432
Ah, I see.
Ok, I see that this blocks https://github.com/vscode-neovim/vscode-neovim/pull/2287 .
https://github.com/vscode-neovim/vscode-neovim/blob/c3e8387a9e9f923ec39c28af6cb8985ca431e438/src/main_controller.ts#L181-L186
I think that
findNvim
can support this without much complexity, by accepting changingpaths: string[]
topaths: string[][]
, so that consumers can pass a command like:Perhaps in the future,
findNvim
could be more clever and do this internally. But meanwhile this is a simple change.