-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Setting g:node_host_prog in init.vim generates an error. #15308
Comments
When setting
I guess the first token |
This comment has been minimized.
This comment has been minimized.
This is e.g. the path to the binary resulting from |
Incase someone gets here to try and set "node" to a fixed version instead of the one in Nope, this doesn't do it. This just sets the path that neovim uses to start the node host but it's still gonna use Even if I do this (documentation was confusing, but this is the correct value to set vim.g.node_host_prog = vim.fn.expand("~") .. "/.nvm/versions/node/v20.13.0/lib/node_modules/neovim/bin/cli.js" It won't do it |
That's probably because This will be fixed as we migrate to "v2 remote plugins" (which don't need |
Neovim Version
v0.5.0
Operating system/version:
Ubuntu 18.04
Terminal name/version:
terminal
TERM environment variable
xterm-256color
Installation
nvim.appimage from the release page
Steps to reproduce
Description
I work on different servers and don't want to mess with system wide installed Python and NodeJS distributions. Moreover, the NodeJS distribution, shipped with e.g. Ubuntu 18.04 is too old. That is why I have a NodeJS distribution and custom Python environment in the ${HOME}/.local/share/nvim/lib folder, for Neovim only. Then I specify in init.vim the node host program and Python host program with the options:
For python, this works excellent. However, for Node, it does not work. Node only works well if the node binary is in the path and the option
g:node_host_prog
is not set.Workaround
Comment out the
g:node_host_prog
setting in init.vim and run nvim with:PS: nvim 0.5.0 on macOS has the same problem.
Vim
No response
Expected behavior
Run :checkhealth in nvim with the node binary of choice in the path and not set the
node_host_prog
:Actual behavior
Run :checkhealth in nvim with
g:node_host_prog
andg:python3_host_prog
set to custom locations. Note that for NodeJS, nvim finds/usr/bin/node
(v8.10.0) installed on the system, instead of the one set withg:node_host_prog
(v14.16.1) option.The text was updated successfully, but these errors were encountered: