caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] merlin autocomplete : "int" at the end of the line
@ 2014-10-18  7:46 Vu~ Ngo.c San
  2014-10-18  8:52 ` Frédéric Bour
  0 siblings, 1 reply; 4+ messages in thread
From: Vu~ Ngo.c San @ 2014-10-18  7:46 UTC (permalink / raw)
  To: caml-list

Hello

I'm trying the combination tuareg+merlin+ocp-indent to work nicely in my 
emacs. I'm puzzled by this behavior:
suppose you end your line with "in" (which is quite common, right ?) and 
then type "return":
The "in" has been autocompleted to "int".

This can't be a default behavior; what do I do wrong ?
Following 
https://github.com/realworldocaml/book/wiki/Installation-Instructions, 
have in my .emacs:
(setq merlin-use-auto-complete-mode t)

regards
San


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] merlin autocomplete : "int" at the end of the line
  2014-10-18  7:46 [Caml-list] merlin autocomplete : "int" at the end of the line Vu~ Ngo.c San
@ 2014-10-18  8:52 ` Frédéric Bour
  2014-10-18  9:32   ` [Caml-list] <DKIM> " Vu~ Ngo.c San
  0 siblings, 1 reply; 4+ messages in thread
From: Frédéric Bour @ 2014-10-18  8:52 UTC (permalink / raw)
  To: caml-list

That's just auto-complete default behavior, which you can customize ( 
http://cx4a.org/software/auto-complete/ ).

The current beta of merlin (which you have if you are using 4.02 on 
opam) allows you to (setq merlin-use-auto-complete 'easy) to override 
defaults.
See 
https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918 
for the corresponding settings.

On 18/10/2014 09:46, Vu~ Ngo.c San wrote:
> Hello
>
> I'm trying the combination tuareg+merlin+ocp-indent to work nicely in 
> my emacs. I'm puzzled by this behavior:
> suppose you end your line with "in" (which is quite common, right ?) 
> and then type "return":
> The "in" has been autocompleted to "int".
>
> This can't be a default behavior; what do I do wrong ?
> Following 
> https://github.com/realworldocaml/book/wiki/Installation-Instructions, 
> have in my .emacs:
> (setq merlin-use-auto-complete-mode t)
>
> regards
> San
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] <DKIM> Re: merlin autocomplete : "int" at the end of the line
  2014-10-18  8:52 ` Frédéric Bour
@ 2014-10-18  9:32   ` Vu~ Ngo.c San
  2014-10-19 10:31     ` Frédéric Bour
  0 siblings, 1 reply; 4+ messages in thread
From: Vu~ Ngo.c San @ 2014-10-18  9:32 UTC (permalink / raw)
  To: Frédéric Bour, caml-list

I currently use opam with 4.01.0 (= system)

do you suggest to change "return" to some other key for autocompletion ?
I fact I don't mind using "return", except in few cases, and "in" is one 
of them. Can one impose such exceptions ?

Le 18/10/2014 10:52, Frédéric Bour a écrit :
> That's just auto-complete default behavior, which you can customize ( 
> http://cx4a.org/software/auto-complete/ ).
>
> The current beta of merlin (which you have if you are using 4.02 on 
> opam) allows you to (setq merlin-use-auto-complete 'easy) to override 
> defaults.
> See 
> https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918 
> for the corresponding settings.
>
> On 18/10/2014 09:46, Vu~ Ngo.c San wrote:
>> Hello
>>
>> I'm trying the combination tuareg+merlin+ocp-indent to work nicely in 
>> my emacs. I'm puzzled by this behavior:
>> suppose you end your line with "in" (which is quite common, right ?) 
>> and then type "return":
>> The "in" has been autocompleted to "int".
>>
>> This can't be a default behavior; what do I do wrong ?
>> Following 
>> https://github.com/realworldocaml/book/wiki/Installation-Instructions, have 
>> in my .emacs:
>> (setq merlin-use-auto-complete-mode t)
>>
>> regards
>> San
>>
>>
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] <DKIM> Re: merlin autocomplete : "int" at the end of the line
  2014-10-18  9:32   ` [Caml-list] <DKIM> " Vu~ Ngo.c San
@ 2014-10-19 10:31     ` Frédéric Bour
  0 siblings, 0 replies; 4+ messages in thread
From: Frédéric Bour @ 2014-10-19 10:31 UTC (permalink / raw)
  To: Vu~ Ngo.c San, caml-list

Try loading this file in emacs http://yawdp.com/~def/merlin-keywords.el
After that, if you (add-to-list 'ac-sources 'merlin-ac-source-keywords) 
it will also lists ocaml keywords in completion, so in should take 
precedence over int.

If you think this help, we may integrate something similar in next release.

On 18/10/2014 11:32, Vu~ Ngo.c San wrote:
> I currently use opam with 4.01.0 (= system)
>
> do you suggest to change "return" to some other key for autocompletion ?
> I fact I don't mind using "return", except in few cases, and "in" is 
> one of them. Can one impose such exceptions ?
>
> Le 18/10/2014 10:52, Frédéric Bour a écrit :
>> That's just auto-complete default behavior, which you can customize ( 
>> http://cx4a.org/software/auto-complete/ ).
>>
>> The current beta of merlin (which you have if you are using 4.02 on 
>> opam) allows you to (setq merlin-use-auto-complete 'easy) to override 
>> defaults.
>> See 
>> https://github.com/the-lambda-church/merlin/blob/a015e9aaca6ce997a835c152051d0611885c38dd/emacs/merlin.el#L1918 
>> for the corresponding settings.
>>
>> On 18/10/2014 09:46, Vu~ Ngo.c San wrote:
>>> Hello
>>>
>>> I'm trying the combination tuareg+merlin+ocp-indent to work nicely 
>>> in my emacs. I'm puzzled by this behavior:
>>> suppose you end your line with "in" (which is quite common, right ?) 
>>> and then type "return":
>>> The "in" has been autocompleted to "int".
>>>
>>> This can't be a default behavior; what do I do wrong ?
>>> Following 
>>> https://github.com/realworldocaml/book/wiki/Installation-Instructions, 
>>> have in my .emacs:
>>> (setq merlin-use-auto-complete-mode t)
>>>
>>> regards
>>> San
>>>
>>>
>>
>>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-19 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18  7:46 [Caml-list] merlin autocomplete : "int" at the end of the line Vu~ Ngo.c San
2014-10-18  8:52 ` Frédéric Bour
2014-10-18  9:32   ` [Caml-list] <DKIM> " Vu~ Ngo.c San
2014-10-19 10:31     ` Frédéric Bour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).