You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
If I run code . from a WSL shell, the current environment variables are not inherited in vscode (see here).
If merlin is only installed in the local switch and not in the global switch, it won't be found since PATH won't include the local _opam/bin/. Same for other local binaries.
I could set paths in the workspace settings (.vscode/settings.json) like this:
However if I have code in a workspace foo/bar/ and open vscode in the parent workspace foo/ it would fail unless I adjust the settings there as well (set paths to "bar/_opam/bin/ocamlmerlin" etc.).
If ocamlmerlin is not found, it could run opam env for the current directory to get the fixed PATH that includes the local switch.
Alternatively:
check the current workspace for a folder _opam/bin (this would fix the usual local switch per workspace case)
walk up the path of an opened .ml file until the project root and look for _opam/bin (this would also work for the nested workspace example).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I run
code .
from a WSL shell, the current environment variables are not inherited in vscode (see here).If merlin is only installed in the local switch and not in the global switch, it won't be found since PATH won't include the local
_opam/bin/
. Same for other local binaries.I could set paths in the workspace settings (
.vscode/settings.json
) like this:However if I have code in a workspace
foo/bar/
and open vscode in the parent workspacefoo/
it would fail unless I adjust the settings there as well (set paths to"bar/_opam/bin/ocamlmerlin"
etc.).If
ocamlmerlin
is not found, it could runopam env
for the current directory to get the fixed PATH that includes the local switch.Alternatively:
_opam/bin
(this would fix the usual local switch per workspace case)_opam/bin
(this would also work for the nested workspace example).The text was updated successfully, but these errors were encountered: