Using merlin in vim for coq plugin development in ocaml
Asked Answered
L

3

5

I installed Coq with opam and want to make a Coq plugin. I managed to compile some plugin examples using coq_makefile, but it would be great if I could use merlin in vim for type information and completion for Coq libraries.

Is there a way in which I can add the Coq libraries to ocamlfind?

Lazulite answered 14/4, 2015 at 1:30 Comment(2)
I really don't know much about plug-in or merlin, but I know some people on the coq-club mailing list are playing with these packaging methods at the moment. I don't think they often come to SO, so I think you should ask your question on the mailing list also.Confessor
Thanks for the suggestion. I contacted some peple that use merlin in some respos for Coq plugins but I think is a good idea to ask in the mailing list as well.Lazulite
I
4

coq_makefile will now generate a .merlin for you. Just type

make .merlin
Ineducable answered 19/7, 2017 at 7:31 Comment(0)
L
3

Finally I answered myself. It was onlly necesary to put the directories of the cmi files of coq in the .merlin file with the directive B

B path/to/coq/kernel
B path/to/coq/library
...
Lazulite answered 12/5, 2015 at 1:30 Comment(0)
E
0

I could not figure out how to properly use coq_makefile to do this and @Nico Lehmann answer didn't work for me.

My .merlin file is:

FLG -rectypes
S /usr/lib/coq/**
B /usr/lib/coq/**

where the first line is important(I have no clue what it means). Of course, change /usr/lib/ to the path where your coq is. You can find the coq location by running coqc -where in the command line.

Elixir answered 19/11, 2019 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.