merlin VS ocamlformat

Compare merlin vs ocamlformat and see what are their differences.

merlin

Context sensitive completion for OCaml in Vim and Emacs (by ocaml)

ocamlformat

Auto-formatter for OCaml code (by ocaml-ppx)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
merlin ocamlformat
12 2
1,541 595
0.9% 1.7%
8.9 8.8
21 days ago 3 days ago
OCaml OCaml
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

merlin

Posts with mentions or reviews of merlin. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-07.
  • Merlin: Context sensitive completion for OCaml in Vim and Emacs
    2 projects | /r/ocaml | 7 May 2022
    2 projects | news.ycombinator.com | 5 May 2022
  • Hacker News top posts: May 7, 2022
    4 projects | /r/hackerdigest | 7 May 2022
    Merlin: Context sensitive completion for OCaml in Vim and Emacs\ (0 comments)
  • Hoogle for Rust?
    5 projects | /r/rust | 3 Aug 2021
    Instead of searching functions based on their type structure (like Hoogle), you could search for functions that "consume"/"produce" values of given types (like OCaml's Merlin). I think Rust already computes variance of type constructors, so such a tool just would have to obtain this information.
  • Dot completion
    3 projects | /r/ocaml | 7 May 2021
    Assuming you followed the instructions you got when you installed merlin (shows up as part of opam's output), you either need a manually created .merlin file to tell it where to find things, or a dune file that lists dependencies with which merlin can auto-create its own. Preferably the latter: use dune and let merlin do the rest.
    3 projects | /r/ocaml | 7 May 2021
    However, after posting this question I stumbled upon this Github issue where they say it isn't supposed to work out of the box and you're supposed to bind a key to it by editing your .emacs file. Turns out the default .emacs file binds auto-complete to "backtab" which means Shift+Tab but that didn't work. I did eventually discover that I can get some kind of completion by binding backtab to completion-at-point like this:
  • Advice/best practice/arhitecture pattern for building language with LSP in mind?
    3 projects | /r/ProgrammingLanguages | 3 May 2021
    Self-advertising: I partcipated to the writing of Merlin: A Language Server for OCaml (Experience Report), which explains the overall design of Merlin, a language server for OCaml. A key idea of Merlin are that classic lexing-parsing-typing pipelines can easily be adapted to be incremental for a Language Server, especially when they are using immutable data structures.
  • Language Server built into the compiler ?
    2 projects | /r/ProgrammingLanguages | 6 Mar 2021
    Self-advertisment: we wrote a paper on how the Merlin tool does this for the OCaml programming language, obtaining good incrementality thanks to well-chosen (and not so large) changes to the existing batch-compiler implementation.

ocamlformat

Posts with mentions or reviews of ocamlformat. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-20.

What are some alternatives?

When comparing merlin and ocamlformat you can also consider the following projects:

hoogle - Haskell API search engine

reason - Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems

mirage - MirageOS is a library operating system that constructs unikernels

google-drive-ocamlfuse - FUSE filesystem over Google Drive

Mosh - Mobile Shell

ocaml-lsp - OCaml Language Server Protocol implementation

rust-prolog - Rust implementation of prolog based on miniprolog: http://andrej.com/plzoo/html/miniprolog.html

TatSu - 竜 TatSu generates Python parsers from grammars in a variation of EBNF

bisect_ppx - Code coverage for OCaml and ReScript

ocaml-decimal - Arbitrary-precision floating-point decimals

bap - Binary Analysis Platform

salsa - A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.