emacs-eclim icon indicating copy to clipboard operation
emacs-eclim copied to clipboard

Autocompletion already starts after first character

Open root42 opened this issue 12 years ago • 8 comments
trafficstars

Since I upgraded to the latest emacs-eclim, my Emacs 23 starts completion whenever I type a character. My auto-complete settings are set to complete words that are more than two characters long. In C++ (using clang auto-complete) this works. What can I do to make emacs-eclim honor this as well?

root42 avatar May 22 '13 07:05 root42

Turns out there was a bit of configuration in the ac-emacs-eclim backend that overrode the value for ac-auto-start. Should be fixed now.

fred-o avatar Jun 10 '13 18:06 fred-o

Yes, this seems to work. However, now I don't get completions after typing '.' -- even when running M-x auto-complete manually. Running M-x eclim-complete at least shows me the completions in an extra buffer. Any ideas how to get this to work again?

root42 avatar Jun 11 '13 09:06 root42

I think that's a limitation of running auto-complete with a required prefix length; the point we want to start completion on is right after the period, and with your setup auto-complete wants at least three characters before starting.

fred-o avatar Jun 13 '13 20:06 fred-o

One problem that I can also see is, that autocomplete uses a function that eclim does not provide anymore:

(defun ac-eclim-candidates ()
  (with-no-warnings
    (loop for c in (eclim/java-complete)
          collect (nth 1 c))))

What's the correct way nowadays to get the eclim completion candidatese from elisp?

root42 avatar Jun 14 '13 14:06 root42

Hm... that is the eclim source bundled with auto-complete? Emacs-eclim provides its own source called ac-source-emacs-eclim, which is better integrated.

The correct way to get completions programatically is to call eclim--completion-candidates or eclim--complete.

fred-o avatar Jul 16 '13 13:07 fred-o

Seems auto-complete-clang(https://github.com/brianjcj/auto-complete-clang/blob/master/auto-complete-clang.el#L289) provide a way to complete when users type ., ->, or :: in c++-mode.

Could we port this mechanism to eclim?

xiaohanyu avatar Oct 16 '13 05:10 xiaohanyu

Any update on this? I would like eclim-complete to start after typing the . or ->. Thanks

marsrc avatar Dec 09 '13 18:12 marsrc

No, sorry. I regret to say I haven't had much time or energy to devote to emacs-eclim recently. Patches are welcome, as always.

fred-o avatar Dec 11 '13 18:12 fred-o