Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

No completion for unsourced namespace #40

Open
abo-abo opened this Issue · 2 comments

3 participants

@abo-abo

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
Owner

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

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.

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.