merlin
merlin copied to clipboard
Strange completions with some keywords in emacs with merlin-company-backend
After let
, if I hit tab or wait for the idle company delay I have this suggestion:
That's not bothering because I usually hit space after it.
But the main problem is with in
, I have my idle company delay set to 0.1 seconds and as soon as I finish typing in
:
Since I almost always press enter after it, I end up having to delete the t
and press enter again to go to the next line.
Maybe there are other keywords behaving like this but I just noticed this with in
and can't find a way to fix it.
Is it something I need to configure or something Merlin needs to fix?
Historically we've been encouraging people to configure their editor so that it doesn't automatically ask merlin for completion either at all, or without at least 3 characters as a prefix for the completion. This would sort your in
troubles.
But another solution to the problem would be for merlin to complete keywords and not just idents. @rgrinberg has been asking this for a while (and proposed an implementation in #1137). I'll leave this issue open until that feature is merged.
Until then: I suggest you change your editor configuration as described.
AFAIK, @rgrinberg's fork of merlin for ocaml-lsp already has keyword completion merged, see here.