ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.57k stars 233 forks source link

How to configure merlin to do only one thing? #247

Closed UnixJunkie closed 10 years ago

UnixJunkie commented 10 years ago

Hello,

Let's suppose that I am interested in merlin providing me only the smart completion while I type. How to enable only this feature and disable all the rest of the bells and whistles? Let's say that I like tuareg-mode to provide all other features.

I suppose merlin will slow down my Emacs (I dropped trying merlin in the past just because of that), how to disable the "while I type" behavior but be able to explicitely ask via some keyboard shortcut "now, show me the completion possibilities".

Thanks a lot, Francois.

let-def commented 10 years ago

Tuareg & merlin features-set doesn't overlap much.

Error messages displayed while saving can be disabled with (setq merlin-error-after-save nil). Other features are invoked explictly, and the invocation can be adjusted by changing keyboard maps (merlin-mode-map).

The "while I type" behavior is not provided by merlin. (setq merlin-use-auto-complete-mode 'easy) address this issue by changing global-settings, unrelated to merlin.

This configuration is displayed in latest opam installation message, try to see if this fix issues for you. Slowness was fixed to a reasonable extent in 1.7.1.

UnixJunkie commented 10 years ago

There is an overlap on syntax highlighting at least, no?

dbuenzli commented 10 years ago

Le mercredi, 27 août 2014 à 10:10, Francois Berenger a écrit :

There is an overlap on syntax highlighting at least, no?

It only highlights errors and warnings.

Daniel

UnixJunkie commented 10 years ago

Is there a list somewhere of all the things I can turn off in merlin?

lehy commented 10 years ago

M-x customize-group merlin ? AFAICS there is no way from there to remove the display in the echo area when you put your cursor on an error. I suppose that you could call (merlin-error-cancel-timer) yourself (M-: (merlin-error-cancel-timer), or put it in a hook, or redefine merlin-error-start-timer to be empty...).

trefis commented 10 years ago

M-x customize-group merlin is indeed the right place to look at. As for disabling error reporting @def-lkb already gave the solution ((setq merlin-error-after-save nil)), and that too can be set from the "customize" interface.

UnixJunkie commented 10 years ago

Thanks!