-
Notifications
You must be signed in to change notification settings - Fork 340
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
Automatically use current node from environment #1188
Comments
Have you simply tried to use |
@dbaeumer That did fix it. I wonder if that should not be the default really rather than the built-in one? |
No, since it would require users to install node to have ESLint support. The direction of VS Code is to work out of the box without any additional executable installs. I will close the issue. |
@dbaeumer But I agree with that direction, but if a node is found in the environment, then I think it should opt to use that instead of the builtin. I.e. the config I would have liked to set such a config in my user settings. That is much more intuitive for me, as I have control of my environments node but I do not have control over the built-in node. |
You mean having an auto value for the runtime setting? |
As your answer was very short, I can only guess what you mean, but I guess yes. Was the problem description in my last post not good enough? The essence is that using a built-in |
I can create a new, better issue for this if wanted with a better description. Will give it a go later. |
@thernstig can you describe your setup a little bit more. Since I can set |
Hi @dbaeumer sorry for the late reply! There are two separate issues as I see it.
This issue is about 2) so maybe 1) should be a separately submitted issue. |
@thernstig regarding your comments:
|
So for Python a) I can set it in my user settings in a similar fashion b) they are working on auto-discovering the "python" enviroment (and thus binary). What am I missing? Would this not also be the ideal case for a user in regards to point 2? |
Python is different in the sense that VS Code doesn't ship any Python. But even if Python discovers the environment it must ask for user configuration as well since this is what the VS Code model asks for. Since VS Code ships with Node we use that version as the default since it avoids the user confirmation step for most users. |
I will try to rephrase this feature request a bit. I will just focus on one thing then, that would solve most problems. Feature request What benefits would this bring?
|
Having one setting Hope that explains it. |
@dbaeumer it is great explaining why things are what they are, and that is appreciated because you have vast knowledge. So thumbs up! I do feel though that considering this is a feature request, we are talking about what we want in the future. What should we request in the VS Code repo to get this working then? Aside: Why is |
@thernstig you need to request a change to the settings scope management in the VS Code repository that a setting with scope Regarding Python: I don't know. I guess they might use a different scope which doesn't support |
Done: microsoft/vscode#119183 |
@thernstig thanks! |
@dbaeumer I just noticed this when using the Settings UI (I usually use the JSON mode): The info there is incorrect then? |
It should read in user/machine setting. |
Fix in the description. |
Hi!
I am using a project such as https://direnv.net/ to set my environment per directory. I.e. if I change into various project directories where I do coding, I can have an
.envrc
(or.env
) file that gets automatically loaaded on dir change. There are many other similar projects (autoenv etc.).In regards to this,
eslint.runtime
is explained like:Looking at other issues here, it seems I need to set this manually? My question is then, is it not possible for it to load the current Node.js version from the environment if not setting this? I also feel the description for the config above should be more verbose, actually mentioning that it needs to be set if that is not the case.
In addition, I am not sure how to work with actually setting
eslint.runtime
. This is specific per project. I cannot set it in my user settings, as that would affect all my projects. I also cannot set it the workspace settings, as different users might install it in different locations.It does seem VS Code properly supports loading the environment: https://code.visualstudio.com/updates/v1_52#_improved-terminal-environment-handling-linux-macos
The text was updated successfully, but these errors were encountered: