I was trying to use coq in vscode but I can't seem to make it to work.
Error:
Could not start coqtop (coqtop)
which is puzzling since my terminal seems to know just fine where coq is:
(meta_learning) brandomiranda~/sketching-learning-coq ❯ coqc -v
The Coq Proof Assistant, version 8.14.1
compiled with OCaml 4.10.2
(meta_learning) brandomiranda~/sketching-learning-coq ❯ echo $PATH
/Users/brandomiranda/.opam/__coq-platform.2022.01.0~8.14~2022.01/bin:/Users/brandomiranda/opt/anaconda3/envs/meta_learning/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin
So my questions are:
- Why is this error happening when I open vscode if my terminal can find coq just fine?
- How do I fix this? What path do I need to set and why?
I was suggested to do:
eval $(opam env); dirname $(which coqtop)
but it didn't do anything or at least it didn't fix the problem...
I did copy pasted:
/Users/brandomiranda/.opam/__coq-platform.2022.01.0~8.14~2022.01/bin
to the prompt vscode gives me and it seems to have fixed it since my script was checked correctly. However, I find this disturbing cu I don't know what it did or why this worked.
Can someone explain to me why this worked -- especially since looking at my PATH (printed above) coq is globally available already?
fyi to install code use their plataform install scripts: https://github.com/coq/platform/blob/main/doc/README_macOS.md I suppose after doing that the above PATH would have been updated to the right thing that I copy pasted to the set global from vscode.
related:

