Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

NVM Node version is not recognised in neovide #1470

Closed
ckangnz opened this issue Aug 9, 2022 · 5 comments
Closed

NVM Node version is not recognised in neovide #1470

ckangnz opened this issue Aug 9, 2022 · 5 comments
Labels
bug Something isn't working shell shell has fun with $PATH and printing things

Comments

@ckangnz
Copy link

ckangnz commented Aug 9, 2022

Describe the bug
A clear and concise description of what the bug is.

My default node version is set to v14 (which i need for my project), but Neovide is defaulting to v18 which I don't have installed.
When opening Nvim, it works fine. Also it works fine on vim.

To Reproduce
Steps to reproduce the behavior:

  1. Use nvm use in a project that has .nvmrc with specific version
  2. Open neovide
  3. Check the version

Expected behavior
A clear and concise description of what you expected to happen.

I expect the node version used in the Neovide to match the node version I was using in the terminal

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Desktop (please complete the following information):

  • OS: [e.g. macOS 12.5]
  • Neovide Version [e.g. 0.9.0]
  • Neovim Version [e.g. 0.7.2]
@ckangnz ckangnz added the bug Something isn't working label Aug 9, 2022
@MultisampledNight
Copy link
Contributor

Thanks for reporting! If you use nvm according to https://github.com/nvm-sh/nvm#zsh, be aware that Neovide is not starting the embedded neovim instance not inside of a login shell, and as such zsh will not source ~/.zshrc. You could use ~/.zprofile instead. I think I'll add this to the website.

@MultisampledNight MultisampledNight added the shell shell has fun with $PATH and printing things label Aug 9, 2022
@ckangnz
Copy link
Author

ckangnz commented Aug 9, 2022

I am, in fact, using "Calling nvm use automatically in a directory with a .nvmrc file" code in my .zshrc

I tried moving the snippet to ~/.zprofile but it complains that it can't find add-zsh-hook in .zprofile because I believe the plugin has not loaded yet. (I also use zplug managing my plugins, which is loaded at the beginning of my .zshrc)

Is there an option for Neovide to source ~/.zshrc via a flag?

@cserb
Copy link

cserb commented Jan 5, 2023

Just adding to the discussion here:
This seems to be a general issue that applies to multiple virtual dev environments (ruby, python, node). Currently I face the same issue with python which has a virtual env for every project and activating it is important for LSP. If I program in Python I have to go back to terminal nvim...
Having a solution rather than a workaround with e.g. .zprofile would be much appreciated

@ckangnz
Copy link
Author

ckangnz commented Feb 15, 2023

Has there been any update on this yet?

@MultisampledNight
Copy link
Contributor

#1758 was merged which might be worth a look, you could build from git main and test. Doesn't fix the situation with Neovide being launched from Finder though.

@neovide neovide locked and limited conversation to collaborators Jan 13, 2024
@fredizzimo fredizzimo converted this issue into discussion #2267 Jan 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working shell shell has fun with $PATH and printing things
Projects
None yet
Development

No branches or pull requests

3 participants