Giter VIP home page Giter VIP logo

Comments (12)

purcell avatar purcell commented on May 23, 2024

Which version are you using, and what corresponding configuration do you have in your emacs init files?

from ac-nrepl.

robinheghan avatar robinheghan commented on May 23, 2024

I using todays version on Melpa.

;; init.el

(require 'auto-complete-config)
(require 'ac-nrepl)
(ac-config-default)
(add-hook 'cider-repl-mode-hook 'ac-nrepl-setup)
(add-hook 'cider-interaction-mode-hook 'ac-nrepl-setup)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'cider-repl-mode))

(defun set-auto-complete-as-completion-at-point ()
(setq completion-at-point-functions '(auto-complete)))
(add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point)
(add-hook 'cider-repl-mode-hook 'set-auto-complete-as-completion-at-point)
(add-hook 'cider-interaction-mode-hook 'set-auto-complete-as-completion-at-point)

from ac-nrepl.

purcell avatar purcell commented on May 23, 2024

Sometimes this can result from trying to auto-complete in a Clojure buffer which defines a namespace that has not yet been created, so you might just need to compile the file you're working on so that the namespace is fully defined.

from ac-nrepl.

robinheghan avatar robinheghan commented on May 23, 2024

Well, this is true for simple functions like "dec" or "defn" also :/
Btw, does this mean that I should AOT my clojure code to get auto-completion/docs?

from ac-nrepl.

purcell avatar purcell commented on May 23, 2024

No, but you should generally C-c C-k your files before working in them, so if you create a new file which defines a new namespace, you should hit C-c C-k after adding the (ns ...) form.

So can you confirm whether doing this makes a difference in your case?

from ac-nrepl.

robinheghan avatar robinheghan commented on May 23, 2024

I entered my source file. Used cider-jack-in, and C-c C-k.
No difference. cider-doc works just fine though

from ac-nrepl.

purcell avatar purcell commented on May 23, 2024

Okay, cool. That gives me more to go on. And do you get any ac-nrepl completion results in the Clojure buffer? These would be results with the symbol "v", "c", "m", "n" or "s" on the right-hand-side of the auto-complete dropdown?

from ac-nrepl.

sw1nn avatar sw1nn commented on May 23, 2024

I had a similar problem. I think it's because cider-interaction-mode is now just cider-mode. Some things are aliased, but dropping the 'interaction' fixed it for me.

from ac-nrepl.

purcell avatar purcell commented on May 23, 2024

Thanks Neale. That would make sense. I just yesterday (?) updated the suggested ac-nrepl setup code to reflect this, because someone pointed out to me that the mode had been renamed.

from ac-nrepl.

purcell avatar purcell commented on May 23, 2024

Hey @bbatsov: it would probably make sense to just drop the cider-interaction-mode alias rather than risk breakage like this, if that is indeed the cause.

from ac-nrepl.

bbatsov avatar bbatsov commented on May 23, 2024

@purcell Will do! I've added the aliases with the idea to avoid breakages, but oddly enough they had the opposite effect. I guess mode aliases are problematic.

from ac-nrepl.

robinheghan avatar robinheghan commented on May 23, 2024

Changing from cider-interaction-mode to cider-mode did the trick, thanks for all help :)

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.