Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove eval'd clojure code in favor of cider's cider-dispatch-complete-symbol #49

Open
gtrak opened this Issue · 8 comments

2 participants

Gary Trakhman Steve Purcell
Gary Trakhman

https://github.com/clojure-emacs/cider/blob/master/cider-interaction.el#L582

This falls back to eval if not present, but will now rely on the presence of the 'complete' nrepl op, which also works with clojurescript repls.

Backend impl is here:
https://github.com/gtrak/cider-nrepl/blob/master/src/cider/nrepl/middleware/complete.clj

Company mode is doing something similar:
https://github.com/clojure-emacs/company-cider/blob/master/company-cider.el#

Seems sensible to me since ac-nrepl's already relying on cider.

Steve Purcell
Owner

Thanks: this is certainly planned, but will have to wait until I have some time, or until a corresponding pull request comes in.

Gary Trakhman

I'm willing to do it.

The primary motivator is cljs support, which means I have to remove direct references to complete.core. Since there are multiple ac-sources, I think I'd have to switch off the others in the presences of cider's implementation. Do you have any thoughts on that?

Steve Purcell
Owner

The only real advantage of the multiple sources is that the flavour of the completion candidate is indicated, e.g. with "c" or "v". But it would be a shame to lose that if we could avoid it... do the candidates returned by nrepl have any meta info indicating their type?

Gary Trakhman
Steve Purcell
Owner

Yeah, we probably don't want to do extra backend calls to grab info for the completed symbols. I'd vote in favour of just merging the current multiple sources into one source backed by nrepl's complete op, thereby losing the "v", "f" symbols etc. I don't think we should retain all the code which uses core.complete just to keep those symbols there. Let's ping @samaaron here and see what he thinks.

Steve Purcell
Owner

@gtrak How recent must nrepl and/or cider be for the complete op to be available?

Gary Trakhman
Gary Trakhman
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.