Skip to content
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

Feature request: Recognize opam local switch #230

Open
nekketsuuu opened this issue May 16, 2021 · 0 comments
Open

Feature request: Recognize opam local switch #230

nekketsuuu opened this issue May 16, 2021 · 0 comments

Comments

@nekketsuuu
Copy link

I installed Coq with opam's local switch (i.e. Run opam switch create ./ and then run opam pin add coq 8.13.2 etc.).

If I launch VSCode under the local switch, this extension properly recognize Coq binaries such as coqtop.

$ cd /path/to/a/project  # After this, the shell automatically enables a local switch (with `opam init --enable-shell-hook`)
$ code .  # This opens VSCode with environment variables of the local switch

Otherwise, VSCode cannot recognize the local switch and the correct Coq binaries. For example, if I close a window of VSCode I opened by the above method and then I open VSCode from the list of applications, VSCode automatically opens the project I closed just before, but it does not enable the local switch and throws Could not start coqtop (coqtop) error or something.

Therefore, how about adding an option to let this extension recognize a current switch automatically?

To do so, we may be going to hack spawnCoqTop function, but I don't know which implementation is better.

https://github.com/coq-community/vscoq/blob/a3025293e77c2b90c38486cb6fc7503b57c4b2bd/server/src/coqtop/CoqTop8.ts#L213

Maybe we can use https://github.com/ocamllabs/vscode-ocaml-platform as a reference implementation.

Any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant