GithubHelp home page GithubHelp logo

Comments (11)

purcell avatar purcell commented on June 28, 2024

Please can you first confirm that auto-complete is working in other buffers, e.g. emacs lisp?

from ac-nrepl.

purcell avatar purcell commented on June 28, 2024

One thing you can try is manually triggering auto-completion using Meta-TAB or M-x auto-complete.

from ac-nrepl.

deflexor avatar deflexor commented on June 28, 2024

Manual triggering works, although it displays completion variants in minibuffer, not in popup.

from ac-nrepl.

purcell avatar purcell commented on June 28, 2024

Aha, then you are triggering nrepl's built-in completion, not AC. Try adding this to your config:

;; hook AC into completion-at-point
(defun set-auto-complete-as-completion-at-point-function ()
  (setq completion-at-point-functions '(auto-complete)))
(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function)

(add-hook 'nrepl-mode-hook 'set-auto-complete-as-completion-at-point-function)
(add-hook 'nrepl-interaction-mode-hook 'set-auto-complete-as-completion-at-point-function)

That should make TAB trigger AC instead.

from ac-nrepl.

deflexor avatar deflexor commented on June 28, 2024

Hello, i made this changes but nothing changed, editor demonstrates competely same behaviour.

from ac-nrepl.

purcell avatar purcell commented on June 28, 2024

As requested earlier, though, please can you first confirm that auto-complete is working in other buffers, e.g. emacs lisp?

from ac-nrepl.

deflexor avatar deflexor commented on June 28, 2024

No, AC not working in other buffers either

from ac-nrepl.

purcell avatar purcell commented on June 28, 2024

Using the default auto-complete config you should at least be able to complete words using dictionary words or words in the same buffer. If that simple case does not work, then the problem lies in your basic auto-complete setup.

You could try

(setq ac-trigger-key (kbd "TAB"))

so that you can trigger AC directly with TAB, but even without that code, AC popups should appear after a 2 second delay.

What happens when you try M-x auto-complete?

And which Emacs version are you using?

from ac-nrepl.

deflexor avatar deflexor commented on June 28, 2024

GNU Emacs 23.3.1

M-x auto-complete:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
read-from-string(nil)
ac-nrepl-candidates()
ac-candidates-1(((candidates . ac-nrepl-candidates) (available . ac-nrepl-available-p) (candidate-face . ac-nrepl-candidate-face) (selection-face . ac-nrepl-selection-face) (prefix . ac-nrepl-symbol-start-pos) (symbol . "n") (document . ac-nrepl-documentation)))
ac-candidates()
ac-update(t)
ac-update-greedy(t)
auto-complete()
call-interactively(auto-complete t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)

from ac-nrepl.

purcell avatar purcell commented on June 28, 2024

Okay, so there are 2 separate problems here: a) auto-complete triggering isn't working for you, and b) ac-nrepl completion is throwing an error.

For a), I'm not sure why my suggested code snippet above didn't work for you, because that's exactly what I do. Perhaps you can post the full config you're now using, and I'll try to reproduce the problem locally.

Regarding b), the stacktrace above indicates a problem that has been fixed in nrepl, but not yet released. I've now patched it in ac-nrepl, so please update to version 0.5, or switch to using the Melpa snapshot packages of nrepl and ac-nrepl (http://melpa.milkbox.net). (Background: the error occurred because the clojure namespace of the current file was undefined -- try compiling the file with C-c C-k, then try M-x auto-complete again.)

from ac-nrepl.

deflexor avatar deflexor commented on June 28, 2024

Thank you very much for help, issue is resolved by upgrading to emacs 24.

from ac-nrepl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.