1

What works

I have installed emacs-eclim and have it working in my Java buffers. For example, I can invoke eclim-java-refactor-rename-symbol-at-point or eclim-java-show-documentation-for-current-element and they behave as expected.

I can run eclim-complete, and I receive a list of correct completions in another buffer.

I evaluate something like company-emacs-eclim--candidates "Object.") in a java buffer, and I get a list of completion candidates.

Without any eclim backends, company also works as expected.

What doesn't work

Hoping to get eclim completion candidates in my Java buffers, I added the following lines to my .emacs:

(require 'company-emacs-eclim)
(company-emacs-eclim-setup)

However, I do not get eclim completions as expected. If I invoke company-emacs-eclim explicitly, I get the error "Cannot complete at point", with the following backtrace:

Debugger entered--Lisp error: (error "Cannot complete at point")
  signal(error ("Cannot complete at point"))
  error("Cannot complete at point")
  company-begin-backend(company-emacs-eclim)
  company-emacs-eclim(interactive)
  ad-Orig-call-interactively(company-emacs-eclim record nil)
  call-interactively(company-emacs-eclim record nil)
  command-execute(company-emacs-eclim record)
  execute-extended-command(nil "company-emacs-eclim")
  smex-read-and-run(("toggle-debug-on-error" "company-emacs-eclim" ...))
  smex()
  ad-Orig-call-interactively(smex nil nil)
  call-interactively(smex nil nil)

Version information

GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian

emacs-eclim 20150502.516

  • Well if the answer wasn't solve, M-TAB is same as 'eclim-complete' for me and it is default key binding. – Vivian Maya May 21 '15 at 0:54
  • Ah, I see, thank you. Yes, eclim-complete works for me (see section "What works"). I get a list of completions in another buffer, and clicking on them inserts the completion (along with the annotation, which isn't too useful). What I'm trying to do here is integrate those completions with company (the typical way to do this is with company-emacs-eclim), so that the completion candidates appear in a dropdown automatically. Ideally it would also autocomplete without the annotation, and with yasnippet integration for inserting arguments. – Matthew Piziak May 21 '15 at 14:08
2

Try enabling eclim-mode when editing the file. That should bring up the completion automatically.

  • Adding (eclim-mode) to my java mode hooks did the trick. Thank you! – Matthew Piziak May 22 '15 at 18:26
  • Doesn't work for me. Using company mode. Won't complete at point, but completes everything else. – Justin Thomas Mar 1 '17 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.