Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

problems with auto-complete #102

Closed
xiaohanyu opened this Issue · 7 comments

5 participants

@xiaohanyu

hi,

I'm a newbie user of eclim + emacs + auto-complete, and my dot emacs about eclim is as follows:

(add-to-list 'load-path (expand-file-name
                         "~/.emacs.d/el-get/eclim/"))
(add-to-list 'load-path (expand-file-name
                         "~/.emacs.d/el-get/eclim/vendor/"))
(require 'eclim)

;; Variables
(setq eclim-auto-save t
      eclim-executable "~/.eclipse/org.eclipse.platform_4.2.0_1543616141/eclim"
      eclimd-executable "~/.eclipse/org.eclipse.platform_4.2.0_1543616141/eclimd"
      eclimd-wait-for-process nil
      eclimd-default-workspace "~/workspace/"
      help-at-pt-display-when-idle t
      help-at-pt-timer-delay 0.1
      ac-delay 0.5
      )

;; Call the help framework with the settings above & activate
;; eclim-mode
(help-at-pt-set-timer)

;; Hook eclim up with auto complete mode
(require 'auto-complete-config)
(ac-config-default)
(require 'ac-emacs-eclim-source)
(ac-emacs-eclim-config)

(add-hook 'java-mode-hook
          (lambda ()
            (remove 'ac-source-clang 'ac-sources)
            (eclim-mode t)))

But when I use auto-complete with eclim, auto-complete provides detailed information about methods, and when I press =Enter=, auto-complete leaves things like this:

String s = "hello, eclim";
s.indexOf(int ch, int fromIndex) : int - String;

How can I make auto-complete just leave =indexOf= instead of =indexOf(...) : ....", things like that?

Thanks very much!

@HornetBlack

I would also like to know this.

@expez

emacs-eclim integrates with yasnippet. Just like eclipse, it shows you the function signature, as a reminder, and you then TAB through each field to provide the arguments to your function call.

If you want to remove this feature, and type in everything yourself manually, then you're likely to have to write that code yourself.

@xiaohanyu

But when I type TAB, emacs locates the point to the end of the whole

 s.indexOf(int ch, int fromIndex) : int - String; -->Point Here after TAB<--

Anybody know why?

@alfredporter
@fred-o
Collaborator

It sounds like you don't have yasnippet installed, or that eclim-use-yasnippet is set to nil for some reason.

However, I've also noticed a bug that has the symptoms you describe that pop up every now and then. It seems to be timing-dependent, which makes it hard to track down. It could be this bug you're seing, but in that case it shouldn't occur all the time.

@HornetBlack

I have no issues any more. Pressing return removes the extra content. TAB will "insert" it but pressing enter will remove it.

@xiaohanyu

@HornetBlack @fred-o Thank you all, now I know what's the problem. Press ENTER after TAB expand will make auto-complete work. I just use it the wrong way, sorry.

Please close this issue.

@fred-o fred-o closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.