ac-nrepl icon indicating copy to clipboard operation
ac-nrepl copied to clipboard

No completion for unsourced namespace

Open abo-abo opened this issue 12 years ago • 3 comments

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.

abo-abo avatar Oct 02 '13 16:10 abo-abo

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.

purcell avatar Oct 02 '13 19:10 purcell

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.

Profpatsch avatar Dec 13 '13 23:12 Profpatsch

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

MalloZup avatar Aug 05 '19 21:08 MalloZup