Questions tagged [merlin]

Merlin is a context-sensitive autocomplete tool for OCaml.

Merlin is a context-sensitive autocomplete tool for OCaml. It provides modern IDE features and out-of-the-box support for Emacs and Vim.

External contributors added support for Visual Studio Code, Sublime Text and Atom.

Links

27 questions
13
votes
3 answers

Merlin complains about a missing module in the same project

I am new to Ocaml and just setting up my dev environment with emacs, merlin and flycheck. Everything works more or less expected except one thing : merlin doesn't seem to be able recognise the dependencies between the modules in the same…
Roman Shestakov
  • 497
  • 5
  • 16
5
votes
3 answers

Using merlin in vim for coq plugin development in ocaml

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…
Nico Lehmann
  • 177
  • 6
5
votes
1 answer

Get ocamlmerlin autocomplete in vim

I'm trying to get autocompletion for OCaml. I like using Vim and I found this plugin: https://github.com/the-lambda-church/merlin I installed it using OPAM and added the required lines to load it to my .vimrc I made sure that OPAM bin folder (which…
SpaceMonkey
  • 4,143
  • 5
  • 38
  • 60
4
votes
1 answer

How to jump to type definition in Emacs + merlin

Is there a way to jump to the type definition of the type of the value under the current cursor? For example if we have the following code: type weekday = Mon | Tue | Wed | Thu | Fri | Sat | Sun let () = Mon(* cursor here *) when you have merlin…
haochenx
  • 143
  • 1
  • 4
3
votes
1 answer

Is it possible to set up Merlin environment for MetaOCaml?

Is it possible to set up Merlin environment for MetaOCaml?
objmagic
  • 1,028
  • 1
  • 9
  • 18
2
votes
1 answer

Merlin on Emacs (GUI) does not get merlin's configuration provided by dune

First, please know that I am a beginner with Dune and project management in Ocaml. Nevertheless, I have installed Dune and created a new Dune-project which deals with camlimages library, graphics, etc. Project compilation and execution works well…
Glouton01
  • 21
  • 2
2
votes
1 answer

(Ocaml) unbound module error on visual code

I have just started to learn Ocaml. I'm using visual code as my IDE on Ubuntu, and I have OCaml extension and merlin installed. and I have the following problem - my workspace folder contains only 2 files: a.ml and b.ml. In the file a.ml I have…
Ygrno
  • 141
  • 1
  • 8
2
votes
1 answer

How to jump to function definition in .ml (not .mli) in emacs merlin-mode

When I press M-. or C-c C-l it usually jumps to the function's declaration in .mli file. Oftentimes there is associated .ml file to which I can switch with C-c C-a but then, I have to search for the implementation of this function in it manually. If…
krokodil
  • 1,326
  • 10
  • 18
2
votes
1 answer

Print module signature of a file using Merlin

Using Merlin 2.5.4, what is the correct way to print the signature of an OCaml file in my project? E.g., suppose I have: (* foo.ml *) let x = 1 And I want to get: val x : int What is the proper command (or sequence of commands)? What I've tried: I…
Yawar
  • 11,272
  • 4
  • 48
  • 80
2
votes
0 answers

Trouble with vim/merlin plugin for OCaml

I am trying to follow the documentation online but I ran into a bit of a stumbling block. Upon adding this code to my .vimrc: set rtp^="/home/z/.opam/system/share/ocp-indent/vim" let g:opamshare = substitute(system('opam config var…
zeldangit
  • 45
  • 4
1
vote
1 answer

Opam switch not working: "error Buffer *OCaml* has no process"

I am on macOS 13.4, I set up my Ocaml environment with emacs but I'm still new at it so I got trouble solving some of my problems: For the project I am working on I had to clone my working repository twice. The first repository works fine: merlin…
Tariot
  • 11
  • 2
1
vote
0 answers

Merlin is not picking up dependencies in a nix flake shell

I have a flake containing a dev shell pinning all the dependencies required to develop a given OCaml program, including an actual OCaml compiler, merlin, findlib and the OCaml libraries. For instance, if the project only depended on Graphics, it…
jthulhu
  • 7,223
  • 2
  • 16
  • 33
1
vote
1 answer

Generate a parser enabling incremental API and inspection API

I have a big project built by menhir and traditional makefile. First, I wanted to add a mechanism of error handling like this project to my project. By following the dune of the sample project, I managed to generate .mly, .mli, .ml, .cmi and .cmo of…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

Unable to install OCaml on macOS Mac M1

I had installed merlin 6 months ago to be able to compile Ocaml and I had no problems. I have recently upgraded to update everything but it was impossible to make the package work. When I try to reinstall it I get this error message (opam install -y…
ThéoS
  • 103
  • 1
  • 1
  • 7
1
vote
0 answers

How can I get Merlin to warn me when I've incorrectly implemented a module interface defined in a .mli file?

I have two files: foo.ml let foo = () foo.mli val foo: int -> int How can I get Merlin to warn me that I've incorrectly implemented the interface?
Max Heiber
  • 14,346
  • 12
  • 59
  • 97
1
2