clojure-emacs / ac-nrepl

[DEPRECATED] Emacs auto-complete backend for nrepl completions
74 stars 11 forks source link

No completion for unsourced namespace #40

Open abo-abo opened 11 years ago

abo-abo commented 11 years ago

I have a buffer with contents:

#_(ns test)
(Double/)

With point behind /, I get proper completion. Note that nothing has been sourced yet.

But if I uncomment the first form, I get Namespace not found error when I try to complete. After sourcing, the problem disappears.

It's a bit of a nuisance, since at the point when I need completion, the code isn't in the valid state. And I'm currently just editing within org-babel source blocks, so I need to drop out of source block etc.

purcell commented 11 years ago

Yep: in general, completion doesn't work well if the namespace isn't defined yet. I don't know if there's a practical strategy for dealing with this.

Profpatsch commented 10 years ago

I kind of solved it with this hook:

(add-hook 'clojure-mode-hook (lambda ()
                               (when (member 'cider-mode minor-mode-list)
                                 (cider-eval-ns-form))))

I don’t know if there are any bad side effects yet.

MalloZup commented 5 years ago

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it